Give an example for the need of class variable.
Answers
Answered by
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
Physics,
7 months ago
Chemistry,
7 months ago
Political Science,
7 months ago
Social Sciences,
1 year ago
English,
1 year ago
Chemistry,
1 year ago