Means that java uses the methods and attributes from the object referred and not from the variable type. *
SuperClass s = new SubClass();
Here SuperClass is the variable type and SubClass is the object type.
Advertisements
Means that java uses the methods and attributes from the object referred and not from the variable type. *
SuperClass s = new SubClass();
Here SuperClass is the variable type and SubClass is the object type.
Leave a Reply