This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Polymorphism Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Polymorphism" Watch "Polymorphism" New topic
Author

Polymorphism

Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

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.


"If the facts don't fit the theory, get new facts" --Albert Einstein
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43349
    
  32
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Polymorphism
 
It's not a secret anymore!