- 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,

30th Mar 2017, 11:02 AM
WONDE-TOM
WONDE-TOM - avatar
2 odpowiedzi
+ 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.
30th Mar 2017, 1:13 PM
( ͡° ͜ʖ ͡°)
- 1
if the operators exist consecutively, their order of computation my be different I think, what about Pree and post in/decrements?
30th Mar 2017, 1:35 PM
WONDE-TOM
WONDE-TOM - avatar