What is the difference between a class variable and an instance variable in inheritance? #6
lukasmiller1
announced in
Announcements
Replies: 1 comment
-
|
A:Class variables are shared across all instances and subclasses. Instance variables are unique to each instance. In inheritance, child classes can access parent class variables. If a child class modifies a class variable, it affects all instances unless overridden. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the difference between a class variable and an instance variable in inheritance?
Beta Was this translation helpful? Give feedback.
All reactions