Why is the String variable name in uppercase ?
interface SimpleObject {
String NAME = "SimpleObject";
void onPress();
}
And if it is to maybe denote that it's a final variable, should the word "final" not be used in front ?
just one question:
Resolved
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Sela
17 July 2020, 13:04
this is because of convention widely accepted. every field declared in interface is assumed to be public static final by default having the meaning of global variable
+4