Hi,
I got this error while compilation if any one of (1) or (2) were uncommented
saying that
reference to method is ambiguous both method method (java.io.IoException) in
testing and
method method(java.lang.Integer) in testing match tc.method(null);
But, i am surprised how this java.io.IoException and java.lang.Integer are related .
can anybody please explain me ?
thanks in advance.
public class testing
{
public void method(java.lang.Object o)
{
System.out.println("Object Version");
}
// (1) Starts
/*public void method(java.io.IOException s)
{
System.out.println("IOException Version");
}*/
// (1) Ends
// (2) Starts
/*public void method(java.io.FileNotFoundException s)
{
System.out.println("java.io.FileNotFoundException Version");
}
*/
// (2) Ends
public void method(Integer o)
{
System.out.println("Integer Version");
}
public static void main(String args[])
{
testing tc = new testing();
tc.method(null);
}
}