Robert

46%
Flag icon
There is one minor exception to this rule. If you are writing a class that is not labeled abstract and you believe that it overrides an abstract method in its superclass, you needn’t bother putting the Override annotation on that method. In a class that is not declared abstract, the compiler will emit an error message if you fail to override an abstract superclass method.
Robert
I still think you should annotate implementations of abstract and interface methods. If in the future the abstract/interface method goes away, your method is now an orphan. With the @Override annotation the orphanization isn't silent; it is called out (as an error) so you can figure out what to do about it.
Effective Java
Rate this book
Clear rating
Open Preview