Donnez la valeur de retour de h avant d'exécuter le code
Created
September 12, 2023 13:15
-
-
Save nherbaut/06a437d879687d4d585979fcc94ec4da to your computer and use it in GitHub Desktop.
L2.1.7 Les conditions.2
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 f(int x) { | |
| return x * 2 - 1; | |
| } | |
| static int h() { | |
| int a = 3; | |
| int b = f(a) + f(4); | |
| return b; | |
| } | |
| public static void main(String... args) { | |
| int returnValue = h(); | |
| System.out.println(returnValue); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment