PRASHNIKAप्रश्निका
Back to the paper

State any one difference between instance variable and class variable.

Computer Science20241 markShort answer

Answer

Answer

AI
An instance variable is declared inside a class without the `static` keyword, and each object of the class gets its own separate copy of it. A class variable is declared with the `static` keyword, and only one copy of it exists, shared by all objects of the class.
Methods

From ISC 2024 Computer Science Paper 1, question 1(x).