
- Java Tutorial
- Java - Home
- Java - Overview
- Java - Environment Setup
- Java - Basic Syntax
- Java - Object & Classes
- Java - Constructors
- Java - Basic Datatypes
- Java - Variable Types
- Java - Modifier Types
- Java - Basic Operators
- Java - Loop Control
- Java - Decision Making
- Java - Numbers
- Java - Characters
- Java - Strings
- Java - Arrays
- Java - Date & Time
- Java - Regular Expressions
- Java - Methods
- Java - Files and I/O
- Java - Exceptions
- Java - Inner classes
- Java Object Oriented
- Java - Inheritance
- Java - Overriding
- Java - Polymorphism
- Java - Abstraction
- Java - Encapsulation
- Java - Interfaces
- Java - Packages
- Java Advanced
- Java - Data Structures
- Java - Collections
- Java - Generics
- Java - Serialization
- Java - Networking
- Java - Sending Email
- Java - Multithreading
- Java - Applet Basics
- Java - Documentation
- Java Useful Resources
- Java - Questions and Answers
- Java - Quick Guide
- Java - Useful Resources
- Java - Discussion
- Java - Examples
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.
- Related Articles
- Which attributes have added to @Deprecated annotation in Java 9?
- What are the improvements for try-with-resources in Java 9?\n
- What are the improvements in Process API in Java 9?
- What are the CompletableFuture API improvements in Java 9?\n
- @SafeVarargs annotation for private methods in Java 9?
- What are the improvements in Out Parameter in C# 7.0?
- 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?
- The PDSA Technique for Quality Improvements
- 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 rules for external declarations in JShell in Java 9?
- What are the rules for private methods in an interface in Java 9?

Advertisements