If you take Java\'s primitive numeric types, plus boolean, and compare it to C++ equivalent types, is there any difference what concerns the operators, like precedence rules
For an expression like:
a = foo() + bar();
In Java, the evaluation order is well-defined (left to right). C++ does not specify whether foo() or bar() is evaluated first.
Stuff like:
i = i++;
is undefined in C++, but again well-defined in Java.
In C++, performing right-shifts on negative numbers is implementation-defined/undefined; whereas in Java it is well-defined.
Also, in C++, the operators &, | and ^ are purely bitwise operators. In Java, they can be bitwise or logical operators, depending on the context.