Is the left-to-right order of operations guaranteed in Java?

后端 未结 10 1389
温柔的废话
温柔的废话 2021-01-04 10:16

Consider this function:

public static final int F(int a, int b) {
    a = a - 1 + b;
    // and some stuff
    return a;
}

Is it required

10条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 10:43

    It would actually not be the JVM implementation that matters, since they just execute a list of instructions from the class file.

提交回复
热议问题