为什么我这个会出错
package com.imooc.test;
public class TryCatchTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
TryCatchTest tct=new TryCatchTest();
int result=tct.test();
System.out.println("test()fangfa执行完毕,返回值为"+result);
}
public int test(){
int divider=10;
int result=100;
try{
while(divider>-1){
divider--;
result=result+100/divider;
return result;
}
}catch(Exception e){
e.printStackTrace();
System.out.println("循环抛出异常了");
return -1;
}
}
}