I thought i understood the protected access modifier but this
test kind of confused me a bit.
The following class is in /home/delDir/Person.java
And this class in the home directory i.e. /home/ZiggyTest2.java
Running ZiggyTest2 produces the following error
I thought that i am accessing it using inheritance, i.e. using an instance of '"SmallPerson".
The way i understood it before is that i wont be able to access 'x' using an instance of 'Person' but if using a subclass of Person it should work. Why is this not the case in the above example?