Posted By Tommy

Summary of Polymorphism

http://www.javapassion.com/javase/javapolymorphism.pdf

Polymorphism

  • 1. An object of type class can reference any of its subclasses, and the methods of the subclass will be used.
    2. An object of type subclass can be passed into any method that takes its superclass, and the methods of the subclass will be used.
  • This means programming more generally by using polymorphic objects, dealing with base class, not each type.

    Polymorphic objects can be made by implementing interfaces, extending classes (including extending abstract classes).

    Post a Comment

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

    Tags Comment Meta:
    RSS Feed for comments
    TrackBack URI