Milind Chaudhary wrote:When I was reading interfaces, it was in K&B that interface constants are public static final implicitly.
Normal constants are final implicitly and they are not public static...
Just tell me am I correct?
constant are final variables, If you defined your own final variable,
you should defined it with final key
word. For interface, whether you defined the variable with or without any of the modifier(public, static, final), those variables are implicitly public static final. For others, you should defined with the keyword final.
Milind Chaudhary wrote:
And also answer to the fact that why a class cannot be declared protected?
What's the purpose of making a class protected?