-
-
Save benjholla/ad65c1f91581b22b718ccd25b991a327 to your computer and use it in GitHub Desktop.
Java Puzzle 7 (spot the bug if one exists)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Puzzle7 { | |
public static void main(String[] args) { | |
System.out.println(getResult()); | |
} | |
private static boolean getResult() { | |
try { | |
try { | |
return true; | |
} finally { | |
return true; | |
} | |
} finally { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adapted from Java Puzzlers: Traps, Pitfalls, and Corner Cases - Puzzle #36