Chapter 3, “Operators and Assignments”
If you want to make sure that the calculation is performed before returning a value, always use a prefix operator.
When binary operations are applied to numeric arguments (integer and floating-point), numeric promotion is performed before the operation takes place.
When one operand in a + operation is a String, then the other operand is converted to a String.
The only runtime exception that occurs during arithmetic operations is the ArithmeticException. This exception is never thrown in floating-point operations and only occurs in integer operations when dividing by 0 or taking the remainder of a number by 0.
The >> operator causes the bits of the left operand to be shifted to the right, based on the value ...
Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.