This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why some classes are called deprecated & some legacy?

 
Manish Thapliyal
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been told that both legacy & depracted refers to old classes which should not be used. But then what is diffrence?


Please explain me the differnce between deprecated class & legacy class.
When a class is called depreacted class & when it is called legacy class.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say it is to do with class maturity and support.

Some classes released in earlier Java versions have been superseded by classes that make their existence obsolete. In some cases it is possible to mark the older immmature versions as 'deprecated' and announce when they will no longer be supported.

In some special cases this is not possible, and the class is considered legacy ie 'should not be used from now on but will not be removed'. Some of the pre-collections classes have been retrofitted to support the Collections interfaces, but the pre-collection Java 1.1 version has special meaning to some Applet, embedded Java and micro-Java cases and therefore needs these classes to exist. So Vector and Hashtable are considered legacy but are unlikely to be removed.
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what's the thread safe alternative to Vector?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ArrayList
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Collections.synchronizedList(new ArrayList(...)) ?
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Use One Thread Per Question. This is basically the same question as Legacy class & depracted class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic