JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public class Program
{
public static void main(String[] args) {
int A = 5;
int N = 3;
int D;
D = calcValue(A);
System.out.println(D);
}
static int calcValue (int N) {
int D;
for ( D = 1; D <5; D++) {
N++;
}
return (N);
}
}
//Can someone explain this code, please? TIA
//9
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run