Java Design Pattern
Introduction to Java 10
Introduction to Java 11
Introduction to Java 12

Java Interface Inheritance

A class implements interface but one interface extends another interface.

Example:
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

About the Author



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






 PreviousNext