here is a Que from
Maha's mock test 33. Consider the classes defined below:
Which of the following are legal method declarations to add to the class Sub? Assume that each method is the only one being added.
a) public static void main(
String args[] ){}
b) float methodTwo(){}
c) long methodOne( int c, long d ){}
d) int methodOne( int c, long d ) throws ArithmeticException{}
e) int methodOne( int c, long d ) throws FileNotFoundException{}
I think answer is
a) as it is our pet main() method
b) as it is overloading super class's method
d) as it is throwing unchecked Exception and I checked it it compiles fine.
e) as FileNotFoundException is subClasss of IOE.
AND
c) can not be as return type is different.
but evalution page says that ans is WRONG.. and page which contains answer is not available.
so plz ane1 can tell what is the answer for the above question
CMIW
TIA