Skip to main content

Posts

Showing posts with the label Method overloading and Method Overriding

Polymorphism, Method overloading and Method Overriding

 Introduction of Polymorphism     Polymorphism is the concept by which we can perform single action/operation in different ways. In other word ability to tae more than one form called polymorphism .     Polymorphism plays an important role in allowing objects having different internal structure to share same external interface. That means the general class of operation may be access in same manner but the specified action with each operation may be different. Ploymorphism is use in implementing inheritance. There are two types of polymorphism in java those are as follows: Compile-time polymorphism. Runtime polymorphism.     We can perform polymorphism using method overloading and method overrding. 1. Compile-time polymorphism:     We can achive the compile time polymorphism using function/method overloading concept . When there are multiple function with the same name but having different parameter list or parameter then it is called functio...