- Get link
- X
- Other Apps
This post covers the topic Polymorphism POLYMORPHISM Poly->many Morphism->forms Taking more than one forms is called polymorphism or one task completed by many ways It has 2 types, Method overloading (static binding/compile time polymorphism) Method overriding (dynamic binding/run time polymorphism) 1. Method overloading: Class->same Method->same Argument->differ In a same class method name is same and the argument is different is called method overloading the argument is depends on data types data types count data type order Example Program: public class StudentInfo { private void studentId(int num) { } private void studentId(String name) { \\ depends on order } private void studentId(String email, int ph) { \\depends on data type } private void studentId(int dob, String add) { ...