Deprecated Meaning In Java. Similarly when a class or method is deprecated it means that the class or method is no longer considered important. It will gradually be phased out.
The Deprecated annotation is used to mark a class method or field as deprecated meaning it should no longer be used. The need for deprecation comes about because as a class evolves its API changes. Deprecated literally means disapproved of but a more accurate translation would be retired.
A program element annotated Deprecated is one that programmers are discouraged from using typically because it is dangerous or because a better alternative exists.
The compiler generates a warning whenever a program uses a method class or field that has already been marked with the Deprecated annotation. In Java it is used in the context of API documents and the meaning of the deprecated in Java is sort of obsolete. A substitute method will be available in the later versions. For some reason or another it has been decided that Java would be better off without it because a better alternative exists and you should use that instead and so it might be removed from a future version of Java.
