-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
58 lines (45 loc) · 1.59 KB
/
Copy pathMain.java
File metadata and controls
58 lines (45 loc) · 1.59 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package Home16;
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
MyMap map = new MyMap();
HashMap hashMap = new HashMap();
map.put("google.com", 123);
map.put("youtube.com", 173);
//System.out.println(map.put("google.com/2",783459));
map.put("google.com/3",1);
map.put("google.com/4",2);
map.put("google.com/5",3);
map.put("google.com/6",4);
map.put("google.com/9",7);
map.put("google.com/10",9);
map.put("google.com/11",10);
map.put("google.com/12",90);
map.put("google.com/12",901);
map.put("act","действовать");
map.put("google.com/43432",24532432);
hashMap.put("W", 234);//
hashMap.put("googleasda.com",2123124);
// System.out.println(hashMap.keySet());
// System.out.println(hashMap);
// System.out.println(map.keySet());
System.out.println(map);
System.out.println(map.size());
System.out.println(map.remove("google.com/9"));
map.remove("google.com/10");
//
//
// System.out.println(map.containsKey("google.com/12"));
// System.out.println(map.containsValue(901));
System.out.println(map);
System.out.println(map.size());
map.putAll(hashMap);
System.out.println("PutAll -> " + map);
System.out.println(map.entrySet());
System.out.println(map.size());
System.out.println(map.keySet());
System.out.println(map.values());
// map.clear();
// System.out.println(map);
}
}