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