define polymorphism java
Polymorphism is the capability of a method to do different things based on the object that it is acting upon. In other words, polymorphism allows you define one interface and have multiple implementations. I know it sounds confusing. Donât worry we will discuss this in detail. 1  It is a feature that allows one interface to be used for a general class of actions. 2  An operation may exhibit different behavior in different instances.