Skip to content

Instantly share code, notes, and snippets.

@jcasadella
Last active May 19, 2016 13:01
Show Gist options
  • Save jcasadella/d68fda03cc4e3b2f88c91fbd95d99bc2 to your computer and use it in GitHub Desktop.
Save jcasadella/d68fda03cc4e3b2f88c91fbd95d99bc2 to your computer and use it in GitHub Desktop.
Java Hello World without semicolons using reflection
public class HelloWorld {
public static void main(String[] args) throws Exception {
if(System.out.getClass().getMethod("println", String.class).invoke(System.out, "HELLO WORLD!") == null) {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment