Polymorphism in Java

Polymorphism is briefly described as “one interface, many implementations”. Polymorphism is a characteristic of being able to assign a different meaning or usage to something in different contexts — specifically, to allow an entity such as a variable, a function, or an object to have more than one form. There are two types of polymorphism:

Compile time polymorphism is method overloading whereas Runtime time polymorphism is done using inheritance and interface.

--

--

Tech enthusiastic, life explorer, single, motivator, blogger, writer, software engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alok Gupta

Tech enthusiastic, life explorer, single, motivator, blogger, writer, software engineer