@Test public void testApp() throws Throwable { App.main(); }
public static void main(String... args) throws Throwable { MethodHandle mh = MethodHandles.privateLookupIn(Hello.class, MethodHandles.lookup()) .findStaticSetter(Hello.class, "name", String.class); mh.invokeExact("Henri"); Hello hello = new Hello(); hello.helloWorld(); }
App { public static void main(String... args) throws Throwable { MethodHandle mh = MethodHandles.privateLookupIn(Hello.class, MethodHandles.lookup()) .findStaticSetter(Hello.class, "name", String.class); mh.invokeExact("Henri"); Hello hello = new Hello(); hello.helloWorld(); } }
App { public static void main(String... args) throws Throwable { MethodHandle mh = MethodHandles.privateLookupIn(Hello.class, MethodHandles.lookup()) .findStaticSetter(Hello.class, "name", String.class); mh.invokeExact("Henri"); Hello hello = new Hello(); hello.helloWorld(); }  }
App { public static void main(String... args) throws Throwable { MethodHandle mh = MethodHandles.privateLookupIn(Hello.class, MethodHandles.lookup()) .findStaticSetter(Hello.class, "name", String.class); mh.invokeExact("Henri"); Hello hello = new Hello(); hello.helloWorld(); }  static void main(String... args); }
App { public static void main(String... args) throws Throwable { MethodHandle mh = MethodHandles.privateLookupIn(Hello.class, MethodHandles.lookup()) .findStaticSetter(Hello.class, "name", String.class); mh.invokeExact("Henri"); Hello hello = new Hello(); hello.helloWorld(); }  static void main(String... args);  }