Posts

Java Questions

1. Difference between Array list and Vector in Java? - Both use same data structure to store the elements that is array. - Array list is not synchronized; multiple threads can use the array list. So it has best performance. -Vector is synchronized; one thread can access the vector at a time. - Vector will grow double its size. - Array list grow half of its size. 2. Differences between Hash Map and Hash table?  - Hash map store the elements in form of key and value pair.  -  Hash table store the elements in form of key and value pair.  -  Hash map and Hash table does not maintain any insertion order. - Hash map allow single null key and multiple null value. - Hash table does not allow single null key and value. - Hash Map is not synchronized but hash table is synchronized 3. What is linked hash map?  - Linked hash map is same as Hash map instead it maintain insertion order. 4. What is difference between Hash Map and Tree Map?  - Hash map allow sing
Recent posts