Is Java foreach iteration order over primitives precisely defined?

后端 未结 0 966
隐瞒了意图╮
隐瞒了意图╮ 2021-02-12 05:22

Example code:

int a[] = new int[]{0, 1, 2, 3};
int result = 0;
for (int i : a)
    result += i;

Is the loop guaranteed to iterate across

相关标签:
回答
  • 消灭零回复
提交回复
热议问题