Interface based polymorphism java1/20/2024 ![]() Polymorphism, therefore, is one of the most significant features of Object-Oriented Programming. So, polymorphism means innumerable forms. “Poly” means numerous, and “Morphs” means forms. The derivation of the word Polymorphism is from two different Greek words- poly and morphs. Thus, allowing us to achieve the same action in many different ways. Polymorphism in Java allows us to use these inherited properties to perform different tasks. Java Inheritance lets one class acquire the properties and attributes of another class. Inheritance is a powerful feature in Java. Polymorphism occurs when there is inheritance, i.e., many classes are related. Since Java supports polymorphism, it is an Object-Oriented Language. So, languages that do not support polymorphism are not ‘Object-Oriented Languages’, but ‘Object-Based Languages’. Polymorphism in Java is the task that performs a single action in different ways.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |