Object Concepts and Terminology-2

Storing a subclass in a variable designed for its

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: olymorphism: •  Allows a common interface even when objects are of varied types •  Subclasses can be treated as if they were instances of the parent class, even when they are not •  Generic code of the parent class can be shared and extended to include detailed behavior of the child classes •  If you have to know the class type before implement a behavior, it’s not polymorphism Meta InformaDon and CasDng InformaDon about an Object’s Type Java creates a generic...
View Full Document

Ask a homework question - tutors are online