Class variables are called static variables. There is only
one occurrence of a class variable per JVM per class loader.When a class is
loaded the class variables are initialized.
Instance variables are non-static and there is one
occurrence of an instance variable in each class instance.Also known as a
member variable or a field.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Class variables are called static variables. There is only one occurrence of a class variable per JVM per class loader.When a class is loaded the class variables are initialized.
Instance variables are non-static and there is one occurrence of an instance variable in each class instance.Also known as a member variable or a field.