Home / Questions / What is the difference between static and non-static variables?
Explanatory Question

What is the difference between static and non-static variables?

👁 770 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.