When we inherit a class which is having the private members in Java, are the private members also inherited? If yes, why cant get them by the class object? If no, then why?
Asked
Active
Viewed 22 times
1 Answers
0
The definition of private
means that they cannot be accessed directly in a sub-class. Have a look at Java's access control.

dave
- 11,641
- 5
- 47
- 65