What Are Class Variables?
Answers
Answered by
2
In object-oriented programming with classes, a class variable is any variable declared with the static modifier of which a single copy exists, regardless of how many instances of the class exist. Note that in Java, the terms "field" and "variable" are used interchangeably. A class variable is not an instance variable
Answered by
4
A class variable is a variable which can be used anywhere in the program and it does not have any scope. It is available within the full class and its sub-class.
It is identified with word static
example:- static int ankit;
Hope it helps...
Similar questions
English,
6 months ago
Accountancy,
6 months ago
Biology,
1 year ago
Biology,
1 year ago
Hindi,
1 year ago