DEVFYI - Developer Resource - FYI

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

Java Interview Questions and Answers (part 2)


(Continued from previous question...)

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

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.

(Continued on next question...)

Other Interview Questions