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 purpose of sleep() method in java?
What is namespace in java?
Which variables are stored in heap?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
What is a percentage sign called?
Why map is used in java?
What do you mean by synchronized non access modifier?
What is array command?
What is mutable object and immutable object?
What is mean by exception?
Explain the public class modifier?
Explain about java sdk?
What is an example of a conditional statement?
Is there a way to increase the size of an array after its declaration?
Explain inner classes ?