In Java, all methods in an interface are public even if we do not specify public with method names. Also, data fields are public static final even if we do not mention it with fields names. Therefore, data fields must be initialized.
Read full article from Access specifier of methods in interfaces | GeeksforGeeks
No comments:
Post a Comment