Monday, June 25, 2018

WAP IN JAVA TO SHOW ABSTRACT CLASS

abstract class Abs
{
    abstract void show();
}
class Sub extends Abs
{
    void show()
    {
        System.out.println("Example of Abstract class");
    }
}
public class Twenty{
    public static void main(String args[])
    {
        Sub ob=new Sub();
        ob.show();
    }
 
}



No comments:

Post a Comment