Computer Science, asked by Aarav4536, 1 year ago

What Are Class Variables?

Answers

Answered by JaishikaKumawat
2

\huge\boxed{hola}

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 Ankit02
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