Java Retention Policy, SOURCE,CLASS,RUNTIME
Categories: Java 9 Java 8(JDK1.8)
Retention Policy: A retention policy determines at what point an annotation is discarded.
It is s specified using Java's built-in annotations: @Retention
1.SOURCE: annotation retained only in the source file and is discarded
during compilation.Example: @Override, @SuppressWarnings
2.CLASS: annotation stored in the .class file during compilation,
not available in the run time.
3.RUNTIME: annotation stored in the .class file and available in the run time.Example: @Deprecated