7、假定Tester类有如下test方法:public int test( int p1, Integer p2)以下哪段代码能正确编译并动态调用一个Tester对象的test方法()?
A. Class classType = Tester.class;Object tester = classType.newInstance();Method addMethod = classType.getMethod( "test", int.class, int.class);Object result = addMethod.invoke( tester, 100, 200 );
B. Class classType = Tester.class;Object tester = classType.newInstance();Method addMethod = classType.getMethod( "test", int.class, int.class);int result = addMethod.invoke( tester, 100, 200 );
Class classType = Tester.class;Object tester = classType.newInstance();Method addMethod = classType.getMethod( "test", int.class, Integer.class);Object result = addMethod.invoke( tester, 100, 200 );
D. Class classType = Tester.class;Object tester = classType.newInstance();Method addMethod = classType.getMethod( "test", int.class, Integer.class);Integer result = addMethod.invoke( tester, 100, 200 );