what is polymorphism

what is polymorphism

1 year ago 36
Nature

Polymorphism is a concept in computer science that refers to the ability of a variable, function, or object to take on multiple forms. In programming language theory and type theory, polymorphism is the provision of a single interface to entities of different types or the use of a single symbol to represent multiple different types). Polymorphism is one of the core concepts of object-oriented programming (OOP) that describes situations in which something occurs in several different forms. In OOP, polymorphism refers to a programming languages ability to process objects differently depending on their data type or class. There are two types of polymorphism in Java: static polymorphism and dynamic polymorphism.

Polymorphism is not limited to computer science. In biology, polymorphism refers to a discontinuous genetic variation resulting in the occurrence of several different forms or types of individuals among the members of a single species. A polymorphism that persists over many generations is usually maintained because no one form possesses an overall advantage or disadvantage over the others in terms of natural selection.

Read Entire Article