Home / Java Programming / Operators and Assignments :: Discussion

Discussion :: Operators and Assignments

  1. Which two statements are equivalent?

    1. 16*4
    2. 16>>2
    3. 16/2^2
    4. 16>>>2

  2. A.
    1 and 2
    B.
    2 and 4
    C.
    3 and 4
    D.
    1 and 3

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    (2) is correct. 16 >> 2 = 4

    (4) is correct. 16 >>> 2 = 4

    (1) is wrong. 16 * 4 = 64

    (3) is wrong. 16/2 ^ 2 = 10


Be The First To Comment