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"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Adapted from Java Puzzlers: Traps, Pitfalls, and Corner Cases - Puzzle #39