wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Legacy class & depracted class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Legacy class & depracted class" Watch "Legacy class & depracted class" New topic
Author

Legacy class & depracted class

Manish Thapliyal
Greenhorn

Joined: Aug 07, 2007
Posts: 17
Please explain me the differnce between deprecated class & legacy class.
When a class is called depreacted class & when it is called legacy class.


Manish
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there,

Deprecated is 'formally' used when a class/method has actually be replaced by a new preferred way of doing things. Keeping the deprecated method is often used for maintaining backwards compatibility.

Legacy classes are classes that should no longer be used and are 'obsolete' but are still around because they are usually used internally by Java itself (e.g. They are classes that you don't directly interact with, but Java itself does).

My explanation perhaps isn't the clearest, so hopefully some others will pop in and answer as well.

Hope that helps!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38474
    
  23
Calling a class or method "deprecated" is more assertive than "legacy;" it is something one ought not use at all, rather than simply "old-fashioned."
Manish Thapliyal
Greenhorn

Joined: Aug 07, 2007
Posts: 17
what happened on this forum also nonone is able to give an proper answer
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38474
    
  23
Originally posted by Manish Thapliyal:
what happened on this forum also nonone is able to give an proper answer
I think you have had answers; if they didn't explain your particular problem you ought to have asked again.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Legacy class & depracted class