Skip to content

Instantly share code, notes, and snippets.

@nherbaut
Last active September 12, 2023 13:23
Show Gist options
  • Select an option

  • Save nherbaut/b3d38a5c65a06307a2d51aa2699666fd to your computer and use it in GitHub Desktop.

Select an option

Save nherbaut/b3d38a5c65a06307a2d51aa2699666fd to your computer and use it in GitHub Desktop.
L2.1.7 Les conditions.3

Donnez la valeur du retour de g(5) sans exécuter le code

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