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