Multiple inheritance in Java by interface

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

1189

Program:

interface father1{

void name();
}

interface father2{
void age();
}

class MultipleInheritance implements father1,father2{

	public void name(){
		System.out.println("Mr. Raman");
		}

	public void age(){
		System.out.println("102");
		}

public static void main(String args[]){
MultipleInheritance obj = new MultipleInheritance();
obj.name();
obj.age();
 }
}

Output:

Mr. Raman
102
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.