About Question enthuware.ocpjp.ii.v11.2.3374 :
Posted: Thu Nov 07, 2019 5:29 am
Hi, Paul. Is correct answer here is "@Override can only be used on instance methods."
But is this right? What about default methods in interfaces? They are not instance methods as far as i understand.
But is this right? What about default methods in interfaces? They are not instance methods as far as i understand.
Code: Select all
public interface A {
default void x() {}
}
Code: Select all
public interface B extends A {
@Override
default void x() {
}
}