Create a Java program to demonstrate a method in an abstract class calling an abstract method
abstract class Shape { abstract void draw(); void display() { System.out.println("Displaying shape..."); draw(); } } class Circle extends Shape { @Override void draw() { System.out.println("Drawing circle"); } } public class Main { public static void main(String[] args) { Circle circle = new Circle(); circle.display(); } }
Displaying shape... Drawing circle
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions