I was wondering what it means to say a field is hidden between 2 java classes and what it means when running code in terms of resulting output?
I have an abstract c
what would be the value of the boolean field in the superclass and the boolean field in the subclass?
The value of field
variable in superclass will remain false and the value of field
in the subclass will remain true.
Does subclass field stay as FALSE after the assignment above?
No. You cannot override static variables in Java. What essentially happens is the definition in the sub class hides the variable declared in the super class.
For a nice example and explanation, see SO Question
I also suggest you try it out yourself to see what happens.