Polymorphism In OOP | 3RD SEM CS8392 OOP |EP=7 QUICK THROUGH | tamil

Опубликовано: 09 Май 2026
на канале: Quick Through
196
2

OBJECT ORIENTED PROGRAMMING
UNIT 1 -INTRODUCTION TO OOP AND JAVA FUNDAMENTALS
1 .6 – Polymorphism


Polymorphism●Polymorphism (from Greek, meaning “many forms”) is a feature that allows one interface to be used for a general class of actions. ●The specific action is determined by the exact nature of the situation. ●For eg, a dog’s sense of smell is polymorphic. If the dog smells a cat, it will bark and run after it. If the dog smells its food, it will salivate and run to its bowl. The same sense of smell is at work in both situations. The difference is what is being smelled, that is, the type of data being operated upon by the dog’s nose


Polymorphism in Java is of two types:●Polymorphism in Java is of two types:●Run time polymorphism,●Compile time polymorphism.


run time polymorphism●run time polymorphism: In Java, runtime polymorphism refers to a process in which a call to an overridden method is resolved at runtime rather than at compile-time. Method overriding is an example of run time polymorphism.


compile time polymorphism●compile time polymorphism: In Java, compile time polymorphism refers to a process in which a call to an overloaded method is resolved at compile time rather than at run time. Method overloading is an example of compile time polymorphism.