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

Q

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

✍: Guest

A

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.

2012-07-26, 2236👍, 0💬