why we cannot declare static variable inside a static method
Answer Posted / sachin kanojiya
Static variable initializes at the time of class load
(static variable initialize very first,after that static
method)that means static variable and method already define
but inside the static method can't declare static variable
because it is treat as static local member...
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What does java stand for?
Is linkedlist thread safe in java?
What is the properties class in java programming?
What is the difference between length and length () in java?
What is static import?
What is the difference between static method and instance method in Java?
java Technical questions asked by JPMC
Is alive and join method in java?
What does percent mean in java?
Can we create object of inner class in java?
What is a constructor overloading in java?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What is method overloading in java ?
what is meant by abstract class?
What are exception handling keywords in java?