package com.snda.sysdev.virtualsys;
/**
* @author chengyongchun
* @date 14-3-21 下午2:54
*/
public class RetryTest {
public static int retryCount = 3;
public static void retry() throws Exception{
int tries = retryCount;
while (true){
tries--;
try{
System.out.println(tries);
System.out.println(tries/0);
break;
}catch (Exception e){
if(tries<1){
throw e;
}
}
}
}
public static void main(String args[]) throws Exception{
RetryTest.retry();
}
}