Collection Theroy
Collection Theroy
Collection(I)
1. List(I)
2. set(I)
3. queue(I)
1. List(I)
c) order of insertion-maintained
d) Storage type:Index
i) Arraylist(IC)
ii) vector(IC)------legacy
iii) LinkedList(IC)
Cursor:
2. listIterator -- only for list interface type impl classes --not universal curser
2. Vector
3. LinkedList
Arraylist linkedList
1. Default capacity:10 1.no deafult capacity
2. DS: resizable 2.DS: linear
3. Best Choice:Retrival operation 3. best choice: manipulation
4. Worst choice: manipulation 4.Wrost choice:Retrival operation
2. Set(I):
a) doesn't allow duplicate
d) Storage type:Hashtable
i) Hashset(IC)
ii) LinkedHashset(IC)
iii) Treeset(IC)
1.Hashset:
3. TreeSet:
3. queue(I)
a) priorityQueue(IC)
Cursor:
1. Iterator—
a) Used to fetch data of all 7 implementation classes
b) It is also called as an universal curser
c) Can fetch data in forward direction only
d) Can perform read and remove operations
2. listIterator –
a) only for list interface type implementation classes
b) Can fetch data in forward direction and backward direction only
c) Can perform read , remove, replace and addition of an object operations
3. enumeration-
a) used to fetch data of vector class only
b) Can fetch data in forward direction only
c) Can perform read operation