aspose file tools*
The moose likes Beginning Java and the fly likes Deprecating? 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 » Beginning Java
Bookmark "Deprecating?" Watch "Deprecating?" New topic
Author

Deprecating?

Conrad Kirby
Ranch Hand

Joined: Jun 17, 2001
Posts: 178
I have never heard of deprecating...would someone tell me what it means?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

"Deprecation" is what Sun does when they come up with a better way of doing something in Java... they leave the old stuff in the API, so that old programs will work, but they warn you when you use it, so that you will know that there are better ( or at least newer ) ways to do what you are trying to do...

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Conrad Kirby
Ranch Hand

Joined: Jun 17, 2001
Posts: 178
Then what is all of this about deprecating a method?
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Conrad
When a method is deprecated it means that there is another recommended way of doing it. For example, this is the description of suspend form the API:
suspend
public final void suspend()
Deprecated. This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.

Basically it is teling you that, yes, you can use it, but they recommend something else.
Also, it is a warning that, at some point, the deprecated method may no longer be supported.
hope that helps
Dave
[This message has been edited by Dave Vick (edited June 18, 2001).]


Dave
omerejaz
Greenhorn

Joined: May 31, 2001
Posts: 3
Originally posted by Conrad Kirby:
I have never heard of deprecating...would someone tell me what it means?

depricated , means that it was firstly used with the older version of the jdk. and currently its use is over. that is
what i have heared.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deprecating?
 
Similar Threads
The evils of the metric system
Adding methods to DBMain
Elbonian Clock
JAVAC not found ??? I cant compile - help
Enumeration vs Iterator