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 is string args [] in java?
How would you convert bytes to string?
What is the difference between preemptive scheduling and time slicing?
How are variables stored?
What does the append?
Which method returns the length of a string?
What about main() method in java ?
What is return keyword in java?
Can an interface extend a class?
Write a program to find the greatest of three numbers in java?
which pattern is default in scanner package?
What is parseint?
Is it compulsory for a try block to be followed by a catch block in java for exception handling?
Explain about public and private access specifiers?
What is singleton service?