Multiple choice technology platforms and products

Which Java operator is right associative?

  1. =

  2. +

  3. >>

  4. <<

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Java, the assignment operator (=) is right-associative, meaning expressions are evaluated from right to left. This allows chained assignments like a = b = c, which is parsed as a = (b = c). Most other Java operators including +, >>, and << are left-associative. Right associativity is rare in Java and is limited primarily to the assignment operator.