abstract class A { abstract void show(); } class B extends A { void show() { System.out.println("welcome"); } } class C extends A { void show() { System.out.println("java"); } } public class Main { public static void main(String arhs[]) { B b=new B(); b.show(); C c=new C(); c.show(); } }
Welcome
Java