Public class food{ public void eat(){ System.out.println("I am the eat method"); } } public class tuna extends food { public void eat(){ System.out.println("I am the eat tuna method"); } } public class potpie extends tuna { } public class Driver { public static void main(String[] args){ food buffet[]= new food[2]; buffet[0]= new tuna(); buffet[1]= new potpie(); for(int i = 0; i<2; i++) buffet[i].eat(); } } write the answer that best describes the highlighted code.

Solved
Show answers

Ask an AI advisor a question