CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Nested Method Calls

Java code walkthrough · Question 24
mediumFunctions

Code

Read carefully. What does this print?
1public class Main {
2 static int add(int a, int b) {
3 return a + b;
4 }
5 
6 static int multiply(int a, int b) {
7 return a * b;
8 }
9 
10 public static void main(String[] args) {
11 int result = add(multiply(2, 3), multiply(4, 5));
12 System.out.println(result);
13 }
14}

Your answer