Answer Posted / ali
No Static Variable cannot declare in method.
but the method present in class can access the static variable
of class.
Or the method which is trying to access the static variable of
class but method is not part of that class at that time declare method as static then it can access that static variable.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is difference between identifier and variable?
Which is faster string or stringbuilder?
How can I debug the Java security exceptions and AccessControlExceptions?
Explain the difference between call by refrence and call by value?
What are static blocks and static initalizers in java ?
Explain covariant method overriding in java.
Can you make a constructor final?
What is a parameter used for?
Differece between class and generic class?
Explain the difference between an object-oriented programming language and object-based programming language?
What is pre increment and post increment in java?
What is the escape character in java?
What are local variables?
Outline the major features of java.
What methods are used to get and set the text label displayed by a button object?