subclass cannot access the members of superclass which are declared as private.
Lets implement this on Eclipse IDE:
1. Create 'A' superclass with an instance variable and a method specified as 'private' s shown below:
Download this project:
Click here to download this project containing 'A' and 'B' class files used in this post (You can download this project and import into Eclipse IDE on your machine)
Please comment below to feedback or ask questions.
Assigning subclass reference to superclass reference will be explained in the next post.