Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"deprecated API"

Status
Not open for further replies.

NiceButDim

Programmer
Feb 12, 2002
154
GB
Hi,
I'm in the early days of learning java. I've been Tackling animation. I’ve made progress, but when I got to the subject of double buffering I started encountering the following warning when compiling;
Note: ani.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.

I’ve traced the ‘problem’ to the following line in my update() method;
Dimension d = size();

My code is working despite the warning, but could someone possibly explain what the warning means?
Thanks.
 
Deprecated means "don't use as the feature may not be supported in the future".

As the API matures, sometimes 'better' ways are discovered of doing things. When the new code is introduced, the old code is marked deprecated so that users of the API will be alerted that the code they are writing may not be supported in the future and that they should investigate an alternative solution.

While your code will compile and run, someday it will stop compiling--when the deprecated classes/methods are removed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top