Donnez la valeur du retour de g(5) sans exécuter le code
Last active
September 12, 2023 13:23
-
-
Save nherbaut/b3d38a5c65a06307a2d51aa2699666fd to your computer and use it in GitHub Desktop.
L2.1.7 Les conditions.3
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 class TypesL2 { | |
| static int g (int a) { | |
| if (a < 9) { | |
| return 9; | |
| } | |
| if (a < 7) { | |
| return 7; | |
| } | |
| if (a < 4) { | |
| return 4; | |
| } | |
| return 0; | |
| } | |
| public static void main(String... args) { | |
| int returnValue = g(5); | |
| System.out.println(returnValue); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment