static只能访问static,成员方法需要new 对象访问
public class Test{
int sub(int a,int b){
return a-b;
}
double sub(double a,double b){
return a-b;
}
public static void main(String [] args){
Test test = new Test();
System.out.println(sub(10,1));
System.out.println(sub(10.0,1.0));
}
}