![]() |
Is java supports polymorphism? Hi friends, I just started the java programming. I want to know that , Is java supports to the polymorphism? Can you explain what is polymorphism and how it can be implemented in JAVA language with suitable example. Your help greatly appreciated... |
Re: Is java supports polymorphism? Hi, Obviously java supports polymorphism. Because JAVA is fully object oriented language. Below details will give you the idea about polymorphism: Polymorphism gives the ultimate flexibility in extensibility. Polymorphism describes a situation in which one name might refer to other different methods. Basically in java supports two type of polymorphism: 1. overloading type. 2. overriding type. When you override any methods in java, java determines the proper methods to call at the run time. Overriding occurs when a class method has the same name and signature as a method in base class it is called as overriding. Example of Overloading: Quote:
Quote:
|
Re: Is java supports polymorphism? Polymorphism is the one of the basic feature of the OOP(Object Oriented Programming). And I think you are not aware that java is object oriented language,So there is no doubts that java supports polymorphism concept. I don't have that much knowledge about this concept But I know that "polymorphism means when an entity behaves entirely different depends upon the context in which it is being used." |
Re: Is java supports polymorphism? Hello friends, Polymorphism stands for Poly(Many) + morhism(foru) which means that multiple forms. It is an Object oriented language feature through which multiple things can be done with only one program code by changing its input parameters only. Java supports polymorphism concept through method overloading and method overriding. refer following example: Quote:
|
All times are GMT +5.5. The time now is 06:05 PM. |