Deprecated APIs

Question:
How do I make a method deprecated?

Answer:
Deprecating a method or entire class is as simple as using the “@deprecated javadoc” tag in its documentation. For example:

/** * @deprecated As of version 2.3, use the newer {@link #bar()} instead. */public void foo() {}

Deprecating an API does not prevent you from using it, but rather serves as a warning that support for the API may be discontinued in the future.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: