Correlating Java features with Wikipedia's definition of Polymorphism -


wikipedia states there 3 (major) types of polymorphism. correlating definition limited understanding of java polymorphism, mapping came -

  1. adhoc polymorphism - java function overloading (dynamic dispatch).
  2. parametric polymorphism - java generics.
  3. subtyping - java function overriding (static dispatch).

is correct?

references - 1. https://en.wikipedia.org/wiki/polymorphism_%28computer_science%29 2. polymorphism - define in 2 sentences

  1. ad-hoc polymorphism map method overloading (where method known @ compile time)
  2. is correct

  3. subtyping map to overriding (dynamic dispatch)


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -