Computer Science, asked by TbiaSamishta, 1 year ago

Give an example for the need of class variable.

Answers

Answered by aqibkincsem
2

In case of Class Variables, only a single copy of that variable exists which is shared with all instances of the class.


If the variable is changed, the effect will be seen by all other instances.


So, if we need to affect all the instances by changing one variable we can take the help of class variables.

Similar questions