Input
Output
public class Abstractclass { public static void main(String args[]) { Shape s=new Circle(); Shape s1=new Rectangle(); s.draw(); s1.draw(); } } abstract class Shape // abstract class { abstract void draw(); } class Rectangle extends Shape { void draw() { System.out.println("Drawing of the rectangle"); } } class Circle extends Shape { void draw() { System.out.println("Drawing of the circle"); } }