Skip to content

Instantly share code, notes, and snippets.

@benjholla
Created September 14, 2018 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjholla/ff2510379247179041ff63e117f01abc to your computer and use it in GitHub Desktop.
Save benjholla/ff2510379247179041ff63e117f01abc to your computer and use it in GitHub Desktop.
Java Puzzle 8 (spot the bug if one exists)
public class Puzzle8 {
public static void main(String[] args) {
run();
}
private static void run() {
try {
System.out.println("Hello");
System.exit(0);
} finally {
System.out.println("Goodbye");
}
}
}
@benjholla
Copy link
Author

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

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