Write a Java program to demonstrate an abstract class with a static block
abstract class Shape { static { System.out.println("Static block in abstract class"); } abstract void 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.draw(); } }
Static block in abstract class Drawing circle
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions