Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Java 9 Improved @Deprecated Annotation

Java 9 Improved @Deprecated Annotation

Java 9 New Features Java 9 New Features

The @Deprecated annotation can mark the status of a Java API, which can be one of the following:

In Java 9, two new elements were added to the annotation:since and forRemoval.

The following example is the documentation for the Boolean class in Java 9, where the @Deprecated annotation uses the since attribute:Boolean Class.

The following example is the documentation for a system class in Java 9, where the @Deprecated annotation uses the forRemoval attribute:System Class.

Java 9 New Features Java 9 New Features