Related knowledge: Three simple annotations and code examples in Java
First, the role
Program elements that @Deprecated annotations do not encourage programmers to use such elements, usually because they are dangerous or have better choices. The compiler issues a warning when using an disapproved program element or executing an override in a code that is not approved.
Second, the transfer of
If a class is used with a @deprecated annotation, the IDE gives a hint where the class is invoked. But what if you invoke the word class of this class, the IDE prompts you?
It is not to be seen from the experimental results. Because the editor inserted in the code does not appear as the IDE prompts, here to use screenshots, interested students can do the experiment.
The above content introduces the Java @Deprecated Annotation's function and the transitivity, hoped everybody likes.