Created
July 8, 2020 12:01
-
-
Save nunomazer/8080b1ac9c0fceedd33695f7da9caae8 to your computer and use it in GitHub Desktop.
Má prática com IF ELSE aninhado
This file contains hidden or 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 boolean myFunction() { | |
| boolean result = someObject.someMethod(); | |
| if (result) { | |
| ... some code ... | |
| if (second-test) { | |
| ... code on true ... | |
| return true | |
| } else { | |
| ... code on false ... | |
| return false | |
| } | |
| } else { | |
| ... log error maybe ... | |
| return false | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment