read the following lines:public int a1(int x){
if(x <= 0) return -1;
if(x > 100) return -2;
if(x = 33) return -3;
return x+1;
}public int a2(int x){
if(x <= 0) throw new NegativeException();
if(x > 100) throw new TooBigException();
if(x = 33) throw new Arg33Exception();
retur x+1;
}int a = a1(x);
switch(a){
case -1: ....... return;
case -2: ....... return;
case -3: a--; break;
}
System.out.println("The Correct Result is"+a);try{
int a = a2(x);
}catch(Arg33Excetpion e){
a--;
}catch(.................){
}...................
if(x <= 0) return -1;
if(x > 100) return -2;
if(x = 33) return -3;
return x+1;
}public int a2(int x){
if(x <= 0) throw new NegativeException();
if(x > 100) throw new TooBigException();
if(x = 33) throw new Arg33Exception();
retur x+1;
}int a = a1(x);
switch(a){
case -1: ....... return;
case -2: ....... return;
case -3: a--; break;
}
System.out.println("The Correct Result is"+a);try{
int a = a2(x);
}catch(Arg33Excetpion e){
a--;
}catch(.................){
}...................
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货