upcast

1 topic · 1 source

Technology› Programming

Java

A cast towards an object's ultimate super type - that is, `up' the inheritance hierarchy towards the Object class, for instance

 // Upcast from VariableController to HeaterController VariableController v; ... HeaterController c = v; 
See downcast. Java's rules of polymorphism mean that an explicit upcast is not usually required.

Cite this definition

APA
MLA
Chicago