Interfaces Flashcards

1
Q

In the case of a class implementing an interface with a static method, can that static method be accessed by an instance of the class? myInstance.staticInterfaceMethod();?

A

No, static interface methods can only be accessed with the name of the interface in front.
MyInterface.staticInterfaceMethod();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly