Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

example of polymorphism

 
Ahmed Shaikh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
need a help.
Any one please show me how polymorphism implemented in java through example.
need an example for it.
Thanx in advance
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15208
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you would have searched "java polymorphism" with Google you would have found the answer in less than 10 seconds yourself...

For example:

Java Tip 30: Polymorphism and Java
The Essence of OOP Using Java, Polymorphism Based on Overloaded Methods
Java Polymorphism Tutorial
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also see the JavaRanch campfire story, "How my dog learned polymorphism."
 
Naveen Vooka
Greenhorn
Posts: 25
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java API is FULL of examples. You can even look at the source code yourself if you want, although it may be a bit more complex than what you currently need. However, the great thing about Object Oriented Programming is that you don't need to worry about the implementation details. You can look at the API docs (see the link in my sig) and get a pretty good idea how many concepts work.

Layne
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic