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
Explain wait() method of object class ?
What is square root in java?
Can we convert list to set in java?
What type of value does sizeof return?
How can you make a class serializable in java?
How do you convert string to int in java?
What is the technique adopted to create an immutable class?
Explain about core java?
How to convert string to char and vice versa?
What is proper subset?
What is loop in java?
What is a heavyweight component?
How would overload a function based on return type?
what methods would you overwrite in java.lang.object class?
What are the advantages of packages in java?