What do mean by polymorphism, inheritance, encapsulation?

Polymorhism: is a feature of OOPl that at run time depending upon the type of object the appropriate method is called.Inheritance: is a feature of OOPL that represents the "is a" relationship between different objects(classes). Say in real life a manager is a employee. So in OOPL manger class is inherited from the employee class. Encapsulation: is a feature of OOPL that is used to hide the information.

Showing Answers 1 - 7 of 7 Answers

Rajesh Sakhamuri

  • Nov 3rd, 2005
 

polymorphism:Behaving differentely at the different placess.Ability to take more than one form.Inhetitance:Aquring the parent properties into child properties.Creating the new class from alredy exiting class.Encapsulation:Wrapping of the methods & variables. By Rajesh

  Was this answer useful?  Yes

Polymorphism is the major pillar of OOPs and Java. There are two types of polymorphism static time polymorphism & dynamic type of polymorphism.


Static time polymorphism is called as" method overloading" & dynamic type of polymorphism is called as "method overriding".

When method call is resolved at compile time it is called as static time polymorphism & when method call is resolved at run time it is called as dynamic type of polymorphism.

In short polymorphism is the feature in which at run time depending upon the object appropriate method is called. This is all about polymorphism.

  Was this answer useful?  Yes

gvjava

  • Dec 8th, 2010
 

We can't create the object directly for the abstract classes,we can create object indirectly when we are inheriting that is called as polymorphism.

  
ex:  abstract class man
           {


              }

           class women extends man
                {
                 man m=new women;



                               }

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions