Can you declare a static variable in a method?

Answer Posted / muthusenthil

No, you can declare static variable only in static method

Is This Answer Correct ?    6 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create an immutable class?

560


What happens if we don’t override run method ?

558


How do you join strings in java?

510


Explain access modifiers in java.

570


Which is better arraylist or vector?

561






What is natural ordering in java?

516


What is class??

743


Explain the difference between map and flatmap stream operation?

807


List implementations of list interface?

555


What is the nested interface?

589


Are arrays primitive data types?

629


What is lifetime variable?

519


What is string builder in java?

550


What are the uses of java?

557


List some important characteristics on jre

579