class Mammal{
String name = "furry";
String makeNoise() (return "generic noise";}
}
class Zebra extends Mammal{
String name = "stripes";
String makeNoise() (return "generic noise";}
}
public class ZooKeeper{
public static void main(String[] args) { new ZooKeeper().go();}
void go() {
Mammal m = new Zebra();
system.out.println(m.name + m.makeNoise());
}
}
The above program prints out furry bray but does not print out the noise? Why is that? because i can figure it out.
I meant to say that i cant figure it out!

New Topic/Question
Reply



MultiQuote









|