Write a Java program with using abstract keyword

Write a Java program with using abstract keyword

Program
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();
    }
}

Output:

Welcome
Java


Abstract In Java



More Questions


136 . Write a Java program with out using abstract keyword
137 . Write a Java program with using abstract keyword
138 . Abstract Practice Program 1
139 . Write a Java program to create object for abstract class
140 . Abstract Practice Program 2
141 . Abstract Practice Program 3
142 . Abstract Practice Program 4
143 . Abstract Practice Program 5
144 . Down Casting Program
145 . Write a Java-program using super.(dot)
146 . Write a Java-program with out using super() no parameterized