I know that array operators have the precedence. Then the binary arthimetic operators * , / , % . Then + and - which they are low precedence.
But I'm confused which one will java solve first in this example.
And if we have 2 operators have the same priority, what operator will be used first in java?
Thank you.
int x = y = -2 + 5 * 7 - 7 / 2 % 5;
If someone could solve this for me and explain to me part by part. Because this always confuses me in exams.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…