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

polymorphism

 
Puneet N Vyas
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is polymorphism,why we need this concept,what is it's utility,how this can be achieved in java...
 
bart zagers
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic