771

Pont cu Java

asa o treaba de cod: care daca te uiti la definitia de la @Override, ap tre sa se compileze, dar uite ca zice asa:I.java:15: method does not override a method from its superclass @Override ^1 errorpublic interface I { void method();}abstract class A implements I {}class B extends A { @Override public void method() { }}DEFINITIA la @OverrideIndicates 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.ia spuneti ...
0