March 2005
Beginner to intermediate
1254 pages
104h 21m
English
Override
An
annotation of this type may be applied to methods and indicates that
the programmer intends for the method to override a method from a
superclass. In effect, it is an assertion for the compiler to verify.
If a method annotated
@Override
does
not, in fact, override another method (perhaps because the method
name was misspelled or an argument was incorrectly typed), the
compiler issues an error. This annotation type has source retention.
Figure 10-50. java.lang.Override
public @interface Override {
}Read now
Unlock full access