GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 161 of 507    Print  
WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR AND HASHMAP AND HASHTABLE?

  
Total Answers and Comments: 11 Last Update: February 14, 2008     Asked by: Vasantha 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
November 12, 2005 09:55:05   
veerendra nadh        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...
when we want to store the objects
 
Is this answer useful? Yes | No
November 14, 2005 07:05:22   
katam Member Since: November 2005   Contribution: 7    

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...

store and objects and made modifications


 
Is this answer useful? Yes | No
November 17, 2005 10:58:54   
Dinesh Jat        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...

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


 
Is this answer useful? Yes | No
November 17, 2005 23:55:42   
sundar        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...
its very useful to me
 
Is this answer useful? Yes | No
November 18, 2005 11:07:56   
Thai Pham        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...

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.


 
Is this answer useful? Yes | No
January 21, 2006 11:37:28   
Raghunath        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...
Check Collections Framework on www.precisejava.com
 
Is this answer useful? Yes | No
April 12, 2006 05:42:41   
arunkala2004@gmail.com        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...
When we will use ArrayList LinkedList or Vvector in collections
 
Is this answer useful? Yes | No
July 29, 2006 07:17:56   
premmm Member Since: July 2006   Contribution: 5    

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...

Hi Dinesh

I think you didn't answer for the above question

txs

Prem

Reply me premkumar.cm@gmail.com


 
Is this answer useful? Yes | No
July 24, 2007 22:03:21   
Yasin        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...
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.

 
Is this answer useful? Yes | No
September 07, 2007 01:27:43   
santu        

RE: WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR ...
ArrayList it is used for faster access
LinkedList is for more insertation and deletion

 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape