@Deprecated annotation was introduced in java 5 version. A program element annotated with @Deprecated means it should not be used for any of the following reasons −
Compiler generates warnings whenever a deprecated element is used. With Java 9, two new enhancements are made to @Deprecated annotation.
forRemoval − Indicates whether the annotated element is subject to removal in a future version. The default value is false.
since − Returns the version in which the annotated element became deprecated. The default value is the empty string.
Following example of Boolean class javadoc on Java 9 illustrate the use of since attribute on @Deprecated annotation.
Following example of System class javadoc on Java 9 illustrate the use of forRemoval attribute on @Deprecated annotation.