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 454 of 502    Print  
Difference Between Collection and Legacy classes
What are the difference between Legacy classes and Collection other than Synchronized?


  
Total Answers and Comments: 3 Last Update: December 12, 2008     Asked by: Senthilkumarb 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 10, 2008 10:59:07   #1  
satyd Member Since: January 2008   Contribution: 3    

RE: Difference Between Collection and Legacy classes
Legacy classes are classes which exist to provide forwards compatibility to existing programs but for which there are better alternatives.
Some are like Vector Stack HashTable. All of which are synchronized.

Use ArrayList in stead of Vector if you don't want thread safe for the collection whenever you add/remove/access objects at end and middle of collection.
Same way use HashMap in stead of HashTable

 
Is this answer useful? Yes | No
February 11, 2008 06:18:03   #2  
sampra Member Since: February 2008   Contribution: 278    

RE: Difference Between Collection and Legacy classes
legacy class are syncronized by defult where as collection's member are not syncronized by deflt
 
Is this answer useful? Yes | No
December 12, 2008 06:50:43   #3  
udaya.kumar Member Since: December 2008   Contribution: 1    

RE: Difference Between Collection and Legacy classes
Legacy Classes : Previously Collection Frame Work was not part of java.util package. Later some of the classes were re-engineered Known as Legacy Classes. Legacy Classes are SYNCRONIZED(Ctrlng accessibility over the resource).
Ex:Vector/Stack/Hashtable/Dictionary/Properties.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

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

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

Page copy protected against web site content infringement by Copyscape