Can static variables be called using className.variableName in Java?
Answers
Answered by
0
No they can never be called using class name or variable name .
Reason :
A static variable is a variable which is declared by the static keyword .
We cannot use any other keyword to declare the variable .
For example :
static n ;
Here n is a static variable .
A static variable is different from a local variable .
A local variable is limited within two curly braces only .
Similar questions
Math,
7 months ago
English,
7 months ago
Computer Science,
1 year ago
Science,
1 year ago
English,
1 year ago