public class TestAdd {
public static void main(String[] args) {
int sum = add(1, 2);
System.out.println(sum);
}
public static int add(int a, int b) {
int c = 0;
c = a + b;
return c;
}
}
JVM中方法执行的流程: