java自定义类引用的小问题

来源:百度知道 编辑:UC知道 时间:2024/05/15 02:03:58
import ch5_8;
public class ch5_9 {
public static void high(int high,int weight,int age)throws AgeException,BodyException {
if(age<0)
throw new ValueException("没有这种岁数");
else if (age<20||age>45)
throw new SuitableException();
else if (200<high||high<150)
throw new HightException();
else if (100<weight)
throw new WeightException(wight,100,"太重了");
else if (weight<50)
throw new WeightException();
}
public static void main(String argsp[]){
Integer index=null;
try{
high(index.parseInt(args[0]),index.parseInt(args[1]),index.parseInt(args[2]));
}
catch(WeightException e)
{
if(e.over())
System.out.println("过重了");
e.printStackTrace();
}
catch(DutyException e){
System.out.println("In catch area.");
System.out.print

请详细描述一下出错提示,因为我只看到下面这个错误:

public static void main(String argsp[]){

这句里面main的参数名称为argsp,下面引用的时候却是:

high(index.parseInt(args[0]),index.parseInt(args[1]),index.parseInt(args[2]));

不知道是你拷错还是真错了,如果真错了似乎不应该提示这个错误……