InterviewSolution
Saved Bookmarks
| 1. |
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» The correct answer is (b) Private Explanation: By declaring variable private, the variable will not be available in inherited to subclass. |
|