Hi
Given the following class definition, which of the following methods could be legally placed
after the comment
//Here
public class Rid{
public void amethod(int i,
String s){}
//Here
}
1)public void amethod(String s, int i){}
2)public int amethod(int i, String s){}
3)public void amethod(int i, String mystring){}
4) public void Amethod(int i, String s) {}
according to me the ans are:1,3
ans given are :1,4
for overloaded methods the method name should be same , the method name in option 4 is Amethod..
i think the 3rd option is correct,it is an overriden method
please explain
thanks
sherin