- 1
Operators precedence, I AM GETTING TROUBLE WITH IT.
is there any short way to know the operator precedence in programming? my friends I am in trouble,
2 ответов
+ 2
(I'm talking about java programming language).
The level of precedence is the same as in math:
example: (2+2)*2 = 8 (brackets have the highest precedence).
So if we have brackets then they have the highest precedence.
If you don't have brackets then the level of precedence is :
first:Multiplication,division and modulo calculations(the place doesn't matter) then
second : Sum and Subtraction.
- 1
if the operators exist consecutively, their order of computation my be different I think, what about Pree and post in/decrements?