Question: Assume that the following classes have been defined: What output is produced by the following code fragment? 1 public class Mammal extends SeaCreature { public
Assume that the following classes have been defined:


What output is produced by the following code fragment?

1 public class Mammal extends SeaCreature { public void methodi () { System.out.println ("warm-blooded"); 3. 1 public class SeaCreature { public void methodl () { System.out.println ("creature 1"); 3. 4. 6. public void method2 () { System.out.println ("creature 2"); 6. 10 public String tostring () { 11 return "ocean-dwelling"; 12 13 public class Whale extends Mammal { public void methodl () { System.out.println ("spout"); 3 9. public String toString (){ 2. 5. 2. 5.
Step by Step Solution
3.52 Rating (155 Votes )
There are 3 Steps involved in it
Output from MammalSeaCreatureWhaleS... View full answer
Get step-by-step solutions from verified subject matter experts
