public class test {
static int n = 2;
public static void main(String[] args) {
System.out.println(getValue("A") * (getValue("B") + getValue("C")));
}
private static int getValue(String s) {
System.out.println(s);
n++;
System.out.println(n);
return n;
}
}

A
3
B
4
C
5
27

かっこの中が先に実行されていたら、5 * (3 + 4) = 35