大家帮我看看这段代码有什么问题,编译不了!!!!
package com.jun;
public class Test {
public static void main(String[] args){
TryCatchTest tct = new TryCatchTest();
int result=tct.test();
}
public class TryCatchTest{
int divider = 10;
int result = 100;
public int test(){
try{
while(result>-1)
result = result+100/divider;
return result;
}catch(Exception e){
e.printStackTrace();
System.out.println("抛出异常了");
return -1;
}
}
}
}