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