我有那段代码,只是得到了FileNotFoundException.
public class Overload {
public void method(Object o) {
System.out.println("Object");
}
public void method(java.io.FileNotFoundException f) {
System.out.println("FileNotFoundException");
}
public void method(java.io.IOException i) {
System.out.println("IOException");
}
public static void main(String args[]) {
Overload test = new Overload();
test.method(null);
}
}
Run Code Online (Sandbox Code Playgroud)
有什么想法为什么会发生?