int REPEAT = 10000000;
if (args.length == 1)
REPEAT = Integer.parseInt(args[0]);
System.out.println("Using a repeat value (number of loop iterations) of " + REPEAT);
Object[] xyz = {new Integer(3), new Integer(10101), new Integer(67)};
boolean res;
long time = System.currentTimeMillis();
res = try_catch_in_loop(REPEAT, xyz);
System.out.println("try catch in loop took " + (System.currentTimeMillis() - time));
time = System.currentTimeMillis();
res = try_catch_not_in_loop(REPEAT, xyz);
System.out.println("try catch not in loop took " + (System.currentTimeMillis() - time));
time = System.currentTimeMillis();
res = try_catch_not_in_loop(REPEAT, xyz);
System.out.println("try catch not in loop took " + (System.currentTimeMillis() - time));
time = System.currentTimeMillis();
res = try_catch_in_loop(REPEAT, xyz);
System.out.println("try catch in loop took " + (System.currentTimeMillis() - time));
time = System.currentTimeMillis();
res = try_catch_not_in_loop(REPEAT, xyz);
System.out.println("try catch not in loop took " + (System.currentTimeMillis() - time));
time = System.currentTimeMillis();
res = try_catch_in_loop(REPEAT, xyz);
System.out.println("try catch in loop took " + (System.currentTimeMillis() - time));