java.lang
Annotation Type Override


@Target(value sample code for java.lang.annotation.Target.value() definition code for java.lang.annotation.Target.value() =METHOD sample code for java.lang.annotation.ElementType.METHOD definition code for java.lang.annotation.ElementType.METHOD )
@Retention(value sample code for java.lang.annotation.Retention.value() definition code for java.lang.annotation.Retention.value() =SOURCE sample code for java.lang.annotation.RetentionPolicy.SOURCE definition code for java.lang.annotation.RetentionPolicy.SOURCE )
public @interface Override

Indicates that a method declaration is intended to override a method declaration in a superclass. If a method is annotated with this annotation type but does not override a superclass method, compilers are required to generate an error message.

Since:
1.5