import java.lang.reflect.*; class Micro { public static void main(String[] args) throws Exception { Method method = Micro.class.getDeclaredMethod("test", new Class[] { Integer.TYPE }); int reps = 10*1000*1000; int result = 0; { System.out.println("Reflection: test(10) x "+reps); for(int j=0; j<5; j++) { long start = System.currentTimeMillis(); // call Object[] params = new Object[] { new Integer(10) }; for(int i=0; i