• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why some classes are called deprecated & some legacy?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what's the thread safe alternative to Vector?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ArrayList
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Collections.synchronizedList(new ArrayList(...)) ?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please Use One Thread Per Question. This is basically the same question as Legacy class & depracted class.
reply
    Bookmark Topic Watch Topic
  • New Topic