-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path26. JavaCollectionsFramework.java
More file actions
72 lines (47 loc) · 2.03 KB
/
26. JavaCollectionsFramework.java
File metadata and controls
72 lines (47 loc) · 2.03 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
the java platform includes a collections framework. a collection is an object that represents a group of objects.
a collections framework is a unified architecture for representing and manipulating collections, enabling collections to be manipulated
independently of implementation details. the primary advantages of a collections framework are that it:
>> reduces programming effort by providing data structures and algorithms so you don't have to write them yourself.
>> increases performance by providing high-performance implementations of data structures and algorithms.
because the various implementations of each interface are interchangeable, programs can be tuned by switching implementations.
>> provides interoperability between unrelated APIs by establishing a common language to pass collections back and forth.
ETC!
actually it's 5 a.m. and i am still going strong - no breaks, just the grind :)
BUT,
if you want, you can go through this whole documentation --> https://docs.oracle.com/javase/8/docs/technotes/guides/collections/overview.html
collection of classes & interfaces:
iterable
↑
collection
↑
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ │ │
│ │ │
list queue set
methods on collections:
1. add
2. size
3. remove
4. iterate
5. addAll
6. removeAll
7. clear
i) list interface:
1. ArrayList
2. LinkedList
3. Vector --> Stack
ii) queue interface (FIFO):
1. PriorityQueue
2. LinkedList
3. Deque (double ended queue) --> ArrayDeque
iii) set interface:
1. HashSet
2. LinkedHashSet
3. SortedSet --> TreeSet
iv) map interface:
1. HashMap
2. LinkedHashMap
3. SortedMap --> TreeMap
4. Hashtable
*/