Answer Posted / aravinda reddy
No we can't declare a static variable in a method or static
method, static variables are class level variables. Static
means one per class as per OO rules and method level
variables scope is with in the method. So if java allows
static variable inside a method, static concept is useless.
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain the selection sort algorithm?
Explain the scope or life time of class variables or static variables?
How to implement a multithreaded applet?
What do you mean by an interface in java?
What is data type example?
How to read and write image from a file ?
What is a dynamic array java?
Why do we need autoboxing in java?
What is string args [] in java?
does java support pointers?
What does escaping a character mean?
What are the advantages of java inner classes?
What is high level language in computer?
Why does java have two ways to create child threads?
Explain jdk, jre and jvm?