What is the difference between static and non-static variables in java programming?



What is the difference between static and non-static variables in java programming?..

Answer / Pranay Kumar Suryavanshi

Static variables are shared among all instances of a class, whereas non-static (instance) variables belong to individual objects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How to obtain a performance profile of java program

1 Answers  


what is the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!

7 Answers   emc2, Kumaran Systems,


What are jee technologies?

1 Answers  


What is the use of callablestatement?

1 Answers  


What are the limitations for static method?

3 Answers   Greenwood,


What are Normalization Rules? Define Normalization?

1 Answers  


Can a lock be acquired on a class in java programming?

1 Answers  


How many types of methods are there?

1 Answers  


what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread

1 Answers  


What is the use of arrays tostring () in java?

1 Answers  


What are the 3 types of loops in java?

1 Answers  


What is main method?

1 Answers  


Categories