Please use Code tags to display your code and use
Use Real Words In this case, 5 is returned because you are creating an SC reference. The variable returned depends on the type of the reference. To get 6, use SCT as the reference type. The fact that you are creating an SCT object makes no difference when accessing variables.
Note that this behavior is unlike the one observed when accessing an overridden method, where the type of instance created will be taken into account.