Multiple Inheritance

When child access property of two parent class ,it generates case of ambiguity

College.java

//Parent class
class college{ 
   void food(){
    System.out.println("It is compulsory");
   }
}
          

canteen.java

//parent class --college
//child class--canteen
class canteen {
  void food(){
  
   System.out.println("Nice food");  
  }
  }
          

student.java

class student extends college,canteen{
    void fees(){
	System.out.println("Pay before time");
	}
}

          


OUTPUT:
Compile time Error
          

Address

Plot number-56/1
Near Gurudwara
LandMark :
Opposite A.N.D college
Govindpuri Metro station
New Delhi
Mobile number:
8826034620