public class Test{
private int i;
public int firstMethod(){
int j=1;
System.out.println("firstMethod 中 i="+i+",j="+j);
return 1;
}
public int secondMethod(float f){
int j=2;
System.out.println("secondMethod 中i="+i+",j="+j+",f="+f);
return 2;
}
public static void main(String[] args){
Test t=new Test();
t.firstMethod();
t.secondMethod();
}
} 编译时,显示无法将16行的Test中的secondMethod(float) 应用于t.secondMethod();请问具体原因是什么呢?