Overloading Cases
package com.sk.demo; class Overloading{ public static void main(String[] args){ A a = new A(); a.m1("String"); // string type method will call a.m1(new Object()); // Object type method will call a.m1(new A()); // Object type method will call a.m1(null); // string type method will call since it is applicable in child level also then no need to go for parent level System.out.println("------------ For B class ------------"); B b = new B(); b.m1(10); b.m1(new Object()); b.m1(null); // since null not applicable for int type then System.out.println("-------------- For C class -------------"); C c = new C(); c.m1("Hello"); c.m1(new StringBuffer("Hi")); c.m1(new Object()); /* error: reference to m1 is ambiguous c.m1(null); ^ both method m1(String) in C and...