Wednesday, July 10, 2002 06:47 AM
And what causes deprecation to happen in Java?
The author of the library causes the warning, by marking the method deprecated in its javadoc. You can do it yourself too, by putting "@deprecated" in the javadoc comment preceding a method in your code.
This is so you will know that you are using something which is old and out of date, and which may disappear in a future version of the library.
So, you should switch to the newer way to do whatever it is that you are trying to do.
When you get a deprecation warning, you need to look the methods up, in the J2SE javadoc at sun.com, because that's where the "deprecated" warning is coming from in the first place.