Skip to content

Instantly share code, notes, and snippets.

@benjholla
Last active September 21, 2018 15:19
Show Gist options
  • Save benjholla/bdf05d9733d6881a4534c80cf06737d1 to your computer and use it in GitHub Desktop.
Save benjholla/bdf05d9733d6881a4534c80cf06737d1 to your computer and use it in GitHub Desktop.
Java Puzzle 10 (spot the bug if one exists)
public class Puzzle10 {
public static void main(String[] args) {
((Puzzle10) null).print();
}
private static void print() {
System.out.println("Hello World!");
}
}
@benjholla
Copy link
Author

Adapted from Java Puzzlers: Traps, Pitfalls, and Corner Cases - Puzzle #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment