What are the Static and Dynamic Variables? Differentiate them.



What are the Static and Dynamic Variables? Differentiate them...

Answer / Sasa

"Static Variable": A variable that is shared among all instances of a class, has the same value for each object created from the class, and is initialized only once when the class is loaded into memory. "Dynamic Variable": A variable whose value can change during program execution and is associated with each object of the class. Dynamic variables are also known as instance variables since they exist for each instance (object) of the class."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is reverse function?

1 Answers  


Define Multiprogramming and Multiprocessing in java.

1 Answers   Akamai Technologies,


Explain the purpose of garbage collection in Java?

1 Answers   BirlaSoft,


What is the purpose of finalization?

4 Answers  


What is use of arraylist in java?

1 Answers  


What are the advantages of compiled language?

1 Answers  


Difference between default and protected access specifiers?

1 Answers  


what is the collable collections in java?

2 Answers   Persistent,


What is run time polymorphism?

6 Answers   eClerx, Elementus Technologies,


How much is a java license?

1 Answers  


What carriage return means?

1 Answers  


What is the difference between static and global variables and also define what are volatile variables?

1 Answers   Flextronics, Hexaware,


Categories