Hi Jason,
Based on the problem description I have written a small program to illustrate the concept.
class GenericFruit {
public float calories( float servesize) { return servesize;}
}
public class Apple extends GenericFruit {
public double calories (double amount) { return amount;}
}
The method calories defined in GeneraicFruit class is overloaded in the class Apple. This is not an example of overriding since the argument types are differnt (here the name of the argument does not matter). So the correct answer is 3 (program compiles without giving any compliation error).
Regards,
Milind
[This message has been edited by Milind Kulkarni (edited June 15, 2000).]