A class implements interface but one interface extends another interface.
interface Simple { void display(); } interface Simple1 extends Simple { void show(); } class Demo implements Simple1 { public void display() { System.out.println("JavaRace"); } public void show() { System.out.println("Welcome to JavaRace"); } } class TestInterface { public static void main(String args[]) { Demo d = new Demo(); d.display(); d.show(); } }
Output
JavaRace
Welcome to JavaRace
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc