[求助]这个重载程序好像没错,但提示错误
class Try{
int x;
int y;
Try(int m){
x=m;
y=m;
}
Try(int m,int n){
x=m;
y=n;
}
int compute(){
return x+y;
}
int comput(int mul){
return (x+y)*mul;
}
}
class 重载{
public static void main(String args[]){
Try tryone;
Try trytwo;
tryone=new Try(5);
trytwo=new Try(10,10);
System.out.println(tryone.compute());
System.out.println(tryone.compute(3));
System.out.println(trytwo.compute());
System.out.println(trytwo.compute(3));
}
}
这个重载程序好像没错,但提示错误,我不明白为什么错