Is operator precedence the same in Java and php? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Is operator precedence the same in Java and php?

11th Jun 2019, 1:02 PM
aMul
5 Answers
+ 5
For most common operators yes.
11th Jun 2019, 10:51 PM
Sonic
Sonic - avatar
+ 1
Yes aMul 997 Note : ++a  =>increments first and then uses the variable. a++  =>uses first and then increments the variable. Example If you have a = 1; //and you do System.out.println(a++); // it will print 1 // but value of a is increase by 1. now value of a=2 System.out.println(++a); //it will print 3 because it's a pre increment // so it will print 3
11th Jun 2019, 5:39 PM
P∆WAN M∆URY∆
P∆WAN M∆URY∆ - avatar
0
ahf
12th Jun 2019, 3:29 AM
seth eslami
seth eslami - avatar
- 1
idk
12th Jun 2019, 1:28 AM
Kitty
- 2
That is a standard Parenthesis () Multiplication / division Addition / subtraction
11th Jun 2019, 3:23 PM
Da2
Da2 - avatar