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