Thursday, October 13, 2011

Learn Core JAVA in Easy Steps [Page 4]





Operators:

1. Arithmetic
 - Assignment
 - Increment
 - Decrement

2. Relational
 - Boolean

3. Logical
 - Short Circuit
 - Long Circuit


PriorityOperatorsOperationAssociativity
1[ ]array indexleft
()method call
.member access
2++pre- or postfix incrementright
--pre- or postfix decrement
+ -unary plus, minus
~bitwise NOT
!boolean (logical) NOT
(type)type cast
newobject creation
3* / %multiplication, division, remainderleft
4+ -addition, substractionleft
+string concatenation
5<<signed bit shift leftleft
>>signed bit shift right
>>>unsigned bit shift right
6< <=less than, less than or equal toleft
> >=greater than, greater than or equal to
instanceofreference test
7==equal toleft
!=not equal to
8&bitwise ANDleft
& boolean (logical) AND
9^bitwise XORleft
^ boolean (logical) XOR
10|bitwise ORleft
| boolean (logical) OR
11&&boolean (logical) ANDleft
12||boolean (logical) ORleft
13? :conditionalright
14=assignmentright
*= /= += -= %=
<<= >>= >>>=
&= ^= |=
combinated assignment
(operation and assignment)



0 comments: