Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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

Answer: b
Explanation: By declaring variable private, the variable will not be available in inherited to subclass.

Join The Discussion