package com.sudhirtheindian2.java123;
import javax.swing.*;
public class poly {
public static void main(String[] args) {
// What is polymorphism in java ?
// poly --->>> many
// morphism--->>>form
// poly+morphism = many form
// polymorphism is the greek word
// whose meaning is same object having different behaviour
// person --->>>
// customer
// friend
// students
// teacher
// void person(teacher)
// void person(students)
// void person(friend)
// void person(customer)
// there are two type to achieve the polymorphism
// 1 compile time polymorphism
// (static polymorphism, early binding)
// A polymorphism which is exists at the time of compilation
// is called compile time or early time or static polymorphism
// method overloading
// we can achieve compile time polymorphism through method overloading
// 2 run time polymorphism
// (dynamic polymorphism ,late binding)
// A polymorphism which exists at the time of execution
// of program is called runtime polymorphism
// method overriding
// we can achieve run time polymorphism through method overriding
}
}
Computer Storage Units Converter Computer Storage Units Converter From: Bytes Kilobytes Megabytes Gigabytes Terabytes Value: To: Bytes Kilobytes Megabytes Gigabytes Terabytes Convert
टिप्पणियाँ
एक टिप्पणी भेजें