Create a Java program to demonstrate a class implementing multiple interfaces
interface Flyable { void fly(); } interface Swimmable { void swim(); } class Bird implements Flyable, Swimmable { @Override public void fly() { System.out.println("Bird is Flying"); } @Override public void swim() { System.out.println("Bird is Swimming"); } } public class Main { public static void main(String[] args) { Bird bird = new Bird(); bird.fly(); bird.swim(); } }
Bird is Flying Bird is Swimming
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions