What is a deprecated API?

John Zukowski

As classes evolve, their API change. To signal to developers that they are using an antiquated feature, class designers can flag classes or methods as deprecated. When used, the compiler will warn you of the invalid usage.

While deprecated classes and methods are still available for usage, at some future time it is possible that they will be dropped from the libraries.

If you get a message that says you are using a deprecated API at compile time, you can compile with the -deprecation option to javac to see any messages related to the deprecated API usage.

javac -deprecation ClassName.java
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact