// Dynamic poly, Method overriding(same name, different class, same arguments(type, sequence, number, IS-A relationship)
class firstClass {
void method1(int a) {
System.out.println("1");
}
}
class secondClass extends firstClass{
void method1(String a) {
System.out.println("2");
}
public static void main(String[] args) {
firstClass fc = new firstClass();
fc.method1(1);
secondClass sc= new secondClass();
sc.method1(45);
}
}