The term polymorphism refers to a number of structures. Basically, we can classify the message that polymorphism can exhibit in more than one structure.
The true case of polymorphism:
An individual may have a different brand at the same time. A father, a spouse, and at the same time a human-like representative. So such individual gangs behave differently in different situations. This is called polymorphism.
Polymorphism is one of the important features of object-oriented programming. Polymorphism allows the expression of discrete activities in a variety of behaviors. At the end of the day, polymorphism allows you to categorize the interface and perform various executions. “Poly” refers to many forms and “transformation” refers to structures, so it refers to many structures.
Polymorphism is an important concept of programming with essay. It refers to more than one structure. That is, a similar element (technique or administrator or item) goes uniquely in different situations.
Polymorphism is about the probability of a technique, based on the article that follows it. Therefore, polymorphism allows you to classify the interface and have a different application. We have categorized the technique () we found in the above model and its various applications into 2 different subclasses.
Java Run-time Polymorphism
Runtime Polymorphism inRuntime Polymorphism or Dynamic Method Dispatch is a process in which the call for additional technique is resolved at runtime instead of the entire time.
In this exercise, the overlay div is responsible for holding dimming the rest of the page. The so-called guaranteed reference variable strategy depends on the specified article.
In this model, we create two classes, Bike and Splendor. The standard class expands the bike class and goes beyond its run () strategy. We call the parent class reference variable the show strategy. Since this refers to the subdivision item and the subdivision strategy cancels the parent class technique, the subdivision technique is executed at runtime.
Java runtime polymorphism with data member is a strategy cancellation, the information is not for individuals, so runtime polymorphism is not managed by information persons.
In the model below, there is a data area speed limit for both classes. We come to the information section when the reference of the parent class to the subject of the subdivision changes. When we come to the information area that is not canceled, as a result it is accessible to the individual from the parent class.
When different capabilities have different capabilities in the same name, these capabilities should be more burdensome. Skills can be overburdened by the number of conflicts and / or change of conflicts.
Java also provides an alternative for overloaded administrators. For example, you can connect two strings with a string class administrator ('+'). We think it's a good idea to add two administrations. So when a particular administrator puts a '+' number between the moves, it contains them and connects them when the string between sets is set.