Java - Methods and Code Reusability
Given this Java code:
What will be printed when the program runs?
public class Calculator {
public static int add(int a, int b) {
return a + b;
}
public static void main(String[] args) {
int result = add(5, 3);
System.out.println(result);
}
}What will be printed when the program runs?
