- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the improvements for @Deprecated annotation in Java 9?
Any element that can be annotated with @Deprecated signifies that this particular element no longer be used for below reasons
- Using it is risky and may cause errors.
- May be incompatible in future versions.
- May be removed in future versions.
- A better and more efficient solution has replaced it.
Java 9 has added two new elements: since and forRemoval attributes.
1) since: The element specifies the deprecated version of the annotated API element.
2) forRemoval: The element representing the annotated API element can be removed in a future version, and the API can be migrated.
The following webpage is the documentation for a Boolean class in Java 9. The @Deprecated annotation uses the "since" attribute in the document: Boolean Class.
The following webpage is a description of the System class in Java 9. The @Deprecated annotation in the document uses the "forRemoval" attribute: System Class.
- What are the improvements for try-with-resources in Java 9?
- What are the CompletableFuture API improvements in Java 9?
- Which attributes have added to @Deprecated annotation in Java 9?
- What are the improvements in Process API in Java 9?
- @SafeVarargs annotation for private methods in Java 9?
- What are the rules for the Subscriber interface in Java 9?
- What are the rules for the Subscription interface in Java 9?
- What are the rules for the Publisher interface in Java 9?
- What are the conditions for Collection factory methods in Java 9?
- What are the rules for external declarations in JShell in Java 9?
- What are the improvements in Out Parameter in C# 7.0?
- What are the rules for private methods in an interface in Java 9?
- What are the features that were deprecated in MySQL 8.0?
- What are the options and variables deprecated in MySQL 8.0?
- What are the enhancements in Internationalization in Java 9?