Multiple inheritance in Java by interface, by same method name

Java Programming Language Abstarct class and Methods in java (Article) Abstarct class and Methods in java (Program)

1550

Program:

 interface Father1{
void name();
}
interface Father2{
void name();
}

class Interface implements Father1, Father2{
	public void name(){
		System.out.println("i am your dad");
		}
public static void main(String args[]){
Interface obj = new Interface();
obj.name();
 }
}

Output:

i am your dad
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.