Quote Originally Posted by AmyJose View Post
Hi,

Can any one please explain how to implement polymorphism without inheritance in java.
It would be useful if it is explained starting with what is polymorphism, types of polymorphism and polymosrphism with inheritance and without inheritance.

Thanks
Can't you be a little more specific?
I don't want to be rude, but if you know nothing about a concept you should first read a manual or a book and then, ask what you don't understand, don't you think?

This is a good place to get help when you are stuck, when you have a concrete problem or when you don't understand something, but we can't explain how OOP (Object-oriented programming) works, and polymorphism is a basic part of OOP.

Nevertheless, you can find a very simple self-explanatory example in Wikipedia. You can also check java.util.List interface and their implementations: LinkedList and ArrayList. Both are a good starting point to understand how polymorphism works.

Albert.