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
what is meant by abstract class?
Can main() method in java can return any data?
What is a treeset class?
What is the difference between method and means?
What does mean in regex?
What are the types of literals?
What are the important features of Java 11 release?
What is linkedlist in java?
Define a java class.
What is array initialization in java?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
What is bubble sort in java?
Which class is the superclass of all classes?
List types of storage classes in java?
How we can run a jar file through command prompt in java?