-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayListDemo.java
More file actions
43 lines (30 loc) · 850 Bytes
/
ArrayListDemo.java
File metadata and controls
43 lines (30 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package node;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
public class ArrayListDemo {
@Override
public String toString() {
return super.toString();
}
@Override
public boolean equals(Object obj) {
return super.equals(obj);
}
@Override
public int hashCode() {
return super.hashCode();
}
public static void main(String[] args) {
List<String> list = new ArrayList<>();
String temp = "helo";
String temp1 = "helo";
Integer i = 9;
Integer j = 10;
System.out.println(i.hashCode());
System.out.println(j.hashCode());
System.out.println(temp.hashCode());
System.out.println(temp1.hashCode());
}
}