WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR AND HASHMAP AND HASHTABLE?

Showing Answers 1 - 17 of 17 Answers

veerendra nadh

  • Nov 12th, 2005
 

when we want to store the objects

  Was this answer useful?  Yes

Dinesh Jat

  • Nov 17th, 2005
 

All are use when we want to handle Objects, alougth difference is

ArrayList contains objects in any order while with LinkList objects are stored in the order which you entered, but both are not thread safe.

Vector is similar to ArrayLias but is Thread Safe.

HashMap is not synchronized, but HashTable is Synchronized

  Was this answer useful?  Yes

sundar

  • Nov 17th, 2005
 

its very useful to me

  Was this answer useful?  Yes

Thai Pham

  • Nov 18th, 2005
 

You normally use ArrayList to keep a list when you only insert at the end.  ArrayList is not synchronized but it is the fastest.  A Vector do the same thing as the ArrayList but it is synchronized and a little slower.

You use a LinkedList when you need to insert an element at the middle of the list.  A LinkedList is not synchronized.

A HashMap is the same as Hashtable as you hash the list for ease of extraction.  Hashtable is synchronized while HashMap is not.

  Was this answer useful?  Yes

arunkala2004@gmail.com

  • Apr 12th, 2006
 

When we will use ArrayList ,LinkedList ,or Vvector in collections

  Was this answer useful?  Yes

Yasin

  • Jul 24th, 2007
 

LIST - Ordered by index, Duplicates Allowed.

ARRAYLIST - Faster Iteration & fast random access

LINKEDLIST - Faster deletion, Insertion than ArryList

VECTOR - Synchronized, Go for it if your LIST requires thread safe.

MAP - With Keys, Duplicate Keys are not allowed.

HASHMAP - Fastet updates since it has keys

HASHTABLE - Synchronized, Go for it if you want your MAP requires thread safe.

  Was this answer useful?  Yes

santu

  • Sep 7th, 2007
 

ArrayList it is used for faster access
LinkedList is for more insertation and deletion

  Was this answer useful?  Yes

sampra

  • Feb 14th, 2008
 

LIST - Ordered by index, Duplicates Allowed.

ARRAYLIST - Faster Iteration & fast random access

LINKEDLIST - Faster deletion, Insertion than ArryList

VECTOR - Synchronized, Go for it if your LIST requires thread safe.

MAP - With Keys, Duplicate Keys value are  allowed.

HASHMAP - Fastet updates since it has keys

HASHTABLE - Synchronized, Go for it if you want your MAP requires thread safe.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions