SE450: Types: Subtyping [28/47] Previous pageContentsNext page

Objects may inhabit more than one type.

  Object x = new Integer(1);

If all of the objects in D are also in B, we say:

This is called subtype polymorphism.

Common notation for theorists: D <: B.

Subtype related to subset -- values(D) is a subset of values(B)

Previous pageContentsNext page