In the original version of the code [*], the two classes are not related to each other, and BaseClass is not even compiled because x not declared or inherited.
If you made BaseClass subclass of SuperClass , x will be false since the SuperClass constructor will work before BaseClass .
[*] Before anyone edited the question to add extend SuperClass .
source share