• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

example of polymorphism

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also see the JavaRanch campfire story, "How my dog learned polymorphism."
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.artima.com/javaseminars/modules/PolymorphInt/
http://www.java2s.com/ExampleCode/Language-Basics/PolymorphisminJava.htm

--------------
Naveen Vooka
www.devsquare.com
DevSquare - Online Application Development
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic