Could you answer me why does
Code: Select all
public void process(A a) { a.i = a.i*2; }
I think that static members are not inherited( or are they ? ), and protected members are accessible in Sub-classes only "through inheritance"... For example, inside B, I could code:
Code: Select all
this.i
super.i
Code: Select all
new B().i // Accessible in B because protected is to class, but not for the object
Code: Select all
new B().i