Java – Rules

Assignment Compatibility

  • byte -> short -> int -> long -> float -> double

Precedence and Associativity Rules

  • Unary operators of equal precedence are grouped right to left
    • +-+rates is evaluated as +(-(+rate))
  • String assignment operators are grouped right to left
    • n1 = n2 = n3; is evaluated as n1 – (n2 = n3);

Be the first to comment

Leave a Reply

Your email address will not be published.


*