wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes what is deprecated? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is deprecated?" Watch "what is deprecated?" New topic
Author

what is deprecated?

sheng zhong
Greenhorn

Joined: Nov 23, 2006
Posts: 20
There are transverse lines on some methods, and says the method is deprecated. What's this? Can I delete it?
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

"Deprecated" usually means the method has been replaced with a newer, preferred way of accomplishing the same thing. The old (deprecated) method is kept in the API only for back-compatability, and should not be used in new code.
[ November 23, 2006: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
A deprecated method is a method that the author says should not be used.

It's probably been replaced with a new/better method.

The deprecated method may be removed completely in a future version of the class.

You can continue to use the method at your own risk.

The javadoc may have more information including which method replaces the deprecated one.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
As and when better way to do things are found , the old method is rendered as deprecated.For most of the cases , the javadoc mentions that why that has been deprecated and what is suppose to be used in similar situations.

Even I have seen that in many of the projects , they do a clean up process from time to time for the removal of the deprecated code.


Rahul Bhattacharjee
LinkedIn - Blog
 
GeeCON Prague 2014
 
subject: what is deprecated?