Created
February 10, 2016 20:46
-
-
Save jbgi/c60acbfd7870237d0de6 to your computer and use it in GitHub Desktop.
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 Example { | |
private int value; | |
public int totallyComplexForSure(int x) { | |
final int result; | |
if (x <= 0) { | |
result = 0; | |
} else if (x == 10) { | |
result = -value; | |
} else { | |
result = value + 10; | |
} | |
return result; | |
} | |
public int lookMaNoLocalVariable(int x) { | |
return x <= 0 ? 0 | |
: x == 10 ? -value | |
: value + 10; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment