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 do you write a conditional statement?

515


Why we use set in java?

511


Explain try and catch keywords in java?

619


What is an abstract class and what is it’s purpose?

533


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

567






What are kinds of processors?

561


Difference between object and reference?

676


What is the main use of generics in java?

507


Why pointers are not used in java?

579


How many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?

572


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1357


What is a lock or purpose of locks in java?

584


What are the pillars of java?

487


Which collections are thread safe in java?

474


What are the restrictions imposed by a Security Manager on Applets?.

2060