File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "polymorphism" Watch "polymorphism" New topic


Puneet N Vyas
Ranch Hand

Joined: Sep 20, 2007
Posts: 61
what is polymorphism,why we need this concept,what is it's utility,how this can be achieved in java...
bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
Take your favorite search engine and you will find it explained numerously.
For example Wikipedia is one of the first hits, complete with a java example.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
In short, (runtime) polymorphism is a tool that allows us to write code that is better decoupled - the code that decides which method to call when can be different from the code that decides which implementation to use for that method call.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I agree. Here's the link:
subject: polymorphism
It's not a secret anymore!