Explain Operator precedence in Java

Operator                                     Description                                Associativity                ...

Operator                                     Description                                Associativity      
       
.                                              Member selection                             Left to right
     ( )                                        Functional call                                  Left to right
     [ ]                                        Array element reference                   Left to right
-                                            Unary minus                                     Right to left
     ++                                       Increment                                         Right to left
      !                                         Decrement                                        Right to left
      ~                                        Ones complement                            Right to left
   (type)                                   Casting                                              Right to left
      *.                                        Multiplication                                    Left to right
      /-                                        Division                                            Left to right
    %                                         Modulus                                           Left to right
    +                                          Addition                                            Left to right
-                                            Subtraction                                       Left to right
    <<                                        Left Shift                                           Left to right
    >>                                        Right Shift                                        Left to right
    >>>                                     Right shift with zero fill                      Left to right
      <                                        Less than                                         Left to right
      <=                                      Less than or equal to                       Left to right
Ø                                      Greater than                                       Left to right
      >=                                      Greater than or equal to                  Left to right
Instance of                            Type comparison                                Left to right
==                                            Equality                                            Left to right
!=                                             Inequality                                          Left to right
&                                             Bitwise AND                                      Left to right
^                                              Bitwise XOR                                      Left to right
½                                           Bitwise                                              Left to right
&&                                           Logical AND                                      Left to right
½½                                           Logical OR                                        Left to right
?:                                             Conditional operator                         Right to left
=                                              Assignment operator                        Right to left
OP=                                        Shorthand assignment                      Right to left

Related

Java 7851253318323869940

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item