aspose file tools*
The moose likes Java in General and the fly likes why some classes are called deprecated & some legacy? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "why some classes are called deprecated & some legacy?" Watch "why some classes are called deprecated & some legacy?" New topic
Author

why some classes are called deprecated & some legacy?

Manish Thapliyal
Greenhorn

Joined: Aug 07, 2007
Posts: 17
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.


Manish
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Aug 05, 2008
Posts: 347
So what's the thread safe alternative to Vector?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
ArrayList


Ping & DNS - updated with new look and Ping home screen widget
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Collections.synchronizedList(new ArrayList(...)) ?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

Please Use One Thread Per Question. This is basically the same question as Legacy class & depracted class.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: why some classes are called deprecated & some legacy?
 
Similar Threads
Inserting Java Date in MySQL as Datetime
Legacy classes
Legacy class & depracted class
How do I deprecate an interface?
Legacy Methods