Why do we have only public static final variables in interfaces?
Interfaces are protocol, templates. Classes implementing the interfaces, decide about the implementationpublic: So that all the classes implementing the interface have access to everything inside class
static:So that the variables, methods inside interface belong to the interface
final:so that implementing classes don't modify the constants
No comments:
Post a Comment