Question: Correct the following programs : A ) interface Animal { public void eat _ eat ( ) ; public void travel _ Eat ( )
Correct the following programs :
A
interface Animal
public void eateat;
public void travelEat;
public class MammalInt implements Animal
public void eat
System.out.printlnMammal eats";
public void travel
System.out.printlnMammal travels";
public void noOfLegs
return ;
public static void mainString args
MammalInt noOfLegs MammalInt;
meat;
mtravel;
Marks
B
Public class ProgramA
Public class static main String Args
Call function Sum ;
Public void sum int xint y;
int z;
Zxy;
System z
Marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
