Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Polymorphism

 
Hunter McMillen
Ranch Hand
Posts: 492
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone,

I'm a student at a university in Virginia and it seems that there is a differing opinion on polymorphism between a few of my professors. Some of them say polymorphism through inheritance is the best way to go, while other promote polymorphism through interfaces. I'd like to hear other peoples opinions.

Thanks,
Hunter.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Horses for courses. I think they are probably both right. Most "inheritance" in Java is probably mimicked by implementing interfaces, rather than extending existing classes, however.

Other opinions welcomed; I am used to people disagreeing with me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic