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
Define array. Tell me about 2-D array.
What are void methods?
Can we have a method name same as class name in java?
Can we inherit inner class?
What is java reflection?
Which collection is sorted in java?
How finally used under exception handling?
What is the difference between jvm and jre? What is an interface?
When arithmeticexception is thrown?
Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?
Can a class declared as private be accessed outside it’s package?
What is main in java?
What is core java called?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
What is valid keyword in java?