You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Main.java 398B

1234567891011121314151617
  1. import java.lang.reflect.Method;
  2. public class Main {
  3. public static void main(String []argv) {
  4. try {
  5. System.out.println("into:main");
  6. Class clazzA = Class.forName("A");
  7. Method clazzAMethod = clazzA.getMethod("method",null);
  8. clazzAMethod.invoke(clazzA.newInstance(),null);
  9. System.out.println("leave:main");
  10. } catch (Throwable t) {
  11. t.printStackTrace();
  12. }
  13. }
  14. }