In order to restrict a variable of a class from inheriting to subclass, how variable should be declared?
(a) Protected
(b) Private
(c) Public
(d) Static
The question was posed to me by my college director while I was bunking the class.
This intriguing question originated from Inheritance in chapter Inheritance of Java