## Uses of Class
java.lang.annotation.Retention

- Packages that use Retention
  Package | Description
  --- | ---
  java.lang |
  java.lang.annotation |

- - ### Uses of Retention in java.lang

    Classes in java.lang with annotations of type Retention
    Modifier and Type | Class and Description
    --- | ---
    `interface` | `Deprecated` A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
    `interface` | `FunctionalInterface` An informative annotation type used to indicate that an interface type declaration is intended to be a functional interface as defined by the Java Language Specification.
    `interface` | `Override` Indicates that a method declaration is intended to override a method declaration in a supertype.

  - ### Uses of Retention in java.lang.annotation

    Classes in java.lang.annotation with annotations of type Retention
    Modifier and Type | Class and Description
    --- | ---
    `interface` | `Documented` Indicates that annotations with a type are to be documented by javadoc and similar tools by default.
    `interface` | `Retention` Indicates how long annotations with the annotated type are to be retained.
    `interface` | `Target` Indicates the kinds of program element to which an annotation type is applicable.

Copyright © 2025 API Design. All Rights Reserved.