JAVA 9 Tutorial
@Deprecated annotation was introduced in java five version. A program component annotated with @Deprecated suggests that it mustn't be used for any of the subsequent reasons −
- Its usage could ends up in errors.
- It is also incompatible in future version.
- It is also removed in future version.
- A higher and economical various has superseeded it.
Compiler generates warnings whenever a deprecated part is used. With Java nine, 2 new enhancements ar created to @Deprecated annotation.
- forRemoval − Indicates whether or not the annotated part is subject to removal during a future version. The default value is false.
- since − Returns the version during which the annotated part became deprecated. The default value is that the empty string.