When an instance method is invoked on an object using an reference, it is the class of the object denoted by the reference and not the type that determines which method to invoke.
When a field/memeber of an object is accessed using a reference it is the type of the reference and not the class of the current object that determines which field is called.
(above explanation is from KM)
oBase.i calls field in class Base and
oBase.methodA() calls method of class Sub