Java and polymorphism

From a variety of textbooks and written examination and interview, we all know, are three characteristics of object-oriented encapsulation, inheritance, polymorphism. But the vast majority of people understand the method and subclass polymorphism only by rewriting the parent class (or interface), access to different behavior. This understanding is one-sided. So, what is polymorphic it? What are the polymorphic form? How to use each form of it?

This article by the Java language, authors introduced the following points:

  1. What is polymorphism (Polymorphism)
  2. Polymorphic species
  3. Subtype polymorphism (Subtype polymorphism)
  4. Generic polymorphism (Parametric polymorphism)
  5. Ad hoc polymorphism (Ad-hoc polymorphism)

Help you better understand and use polymorphism to simplify programming.

Read more: http://gitbook.cn/gitchat/activity/5cf5447f4234ff68d68a6efb

A field watching too much trouble? GitChat become members and enjoy 1000+ games Chat! Click to view

Guess you like

Origin blog.csdn.net/valada/article/details/91176496