‹ Back to the paper
State any one difference between instance variable and class variable.
Answer
Answer
AIAn 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.
From ISC 2024 Computer Science Paper 1, question 1(x).