But in Java, it is restricted to function overloading as Java doesn’t provide the support to carry out operator overloading. This type of polymorphism can be achieved through function overloading or operator overloading. Compile-time polymorphism (static binding)Ĭompile-time polymorphism is also known as static binding. In Java, polymorphism is broadly classified into two categories: Polymorphism is one of the most important features of any object-oriented programming language (for example, Java), With the help of polymorphism, a single task can be carried out in different ways. Hence, a person can exhibit different characteristics under different conditions. For example, a mother at the same time can be a wife, daughter, sister, employee of a company, etc. Real-Life ExampleĪ person can exhibit many characteristics at the same time. In the programming world, it is defined as the capability of a signal or message to be displayed in more than one form. Thus polymorphism means having many forms. A good understanding of polymorphism allows us to build efficient object-oriented programs. Most developers claim that they know the topic well but when it comes to other complex features like static and dynamic binding, they seem underconfident. Whether you are new to Java programming or a person who has worked with Java for years, you should know what polymorphism is in Java and how it works. Polymorphism is an Object-Oriented-Programming concept.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |