Polymorphism

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 807 Views - Last Post: 11 June 2020 - 12:58 AM Rate Topic: -----

#16 cfoley   User is offline

  • Cabbage
  • member icon

Reputation: 2410
  • View blog
  • Posts: 5,050
  • Joined: 11-December 07

Re: Polymorphism

Posted 11 June 2020 - 12:58 AM

It sounds like nicephotog is referring to either ad-hoc polymorphism or parametric polymorphism as discussed here. https://en.wikipedia...mputer_science)

In Java conversation, people will look at you funnily if you use polymorphism to describe those concepts. Instead, they mean subtype polymorphism. It's ironic really because subtype polymorphism allows for the different subtypes to be passed to functions that accept the interface. Those functions that accept all implementations of the interface exhibit parametric polymorphism.

In any case, you would be more easily understood if you use overloading in place of ad-hoc polymorphism, and describe parametric polymorphism in terms of is-a relationships or generics as appropriate.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2