Class Diagram of Collection in java
Q1.Difference between Collection and Collections?
Ans.Will be updated soon
Q2.What is fail-safe and fail-fast in the collection?
Ans.Will be updated soon
Q3.Difference between Array and Vector?
Ans.Will be updated soon
Q4.Difference between ArrayList and LinkedList?
Ans.Will be updated soon
Q5.Difference between ArrayList and Array?
Ans.Will be updated soon
Q6.Difference between List and Set?
Ans.List | Set |
---|---|
The list is ordered or sequential. | Set is unordered |
The list can have duplicate elements. | Set will keep only distinct elements. |
The list can have multiple null values | Set can have a single null value. |
It can have positional access. | We can not have positional access. |
Implemented using ArrayList, LinkedList, Vector. | Implemented using HashSet,LinkedHashSet,TreeSet |
Q7.Difference between List and Map?
Ans.Will be updated soon
Q8.Difference between List and Queue?
Ans.Will be updated soon
Q9.Difference between HashMap and HashTable?
Ans.Will be updated soon
Q10.Difference between HashMap and HashSet?
Ans.Will be updated soon
Q11.Insertion order in hashMap and HashTable?
Ans.Will be updated soon
Q12.Difference between hashmap, treemap and LinkedHashmap?
Ans.Will be updated soon
ConversionConversion EmoticonEmoticon