Link to home
Start Free TrialLog in
Avatar of just23
just23Flag for Ireland

asked on

java operators

can anyone explain me .please that line
result = (byte)(x | y);  
does?

Given this code, what is the value of the result variable if the bit pattern for 4 is 0000 0100 and the bit pattern for 7 is 0000 0111?
byte x, y, result;
x = 4;
y = 7;
result = (byte)(x | y);

Choose an option.

      0000 0011
      0000 0100
      0000 0111
      1000 0111
ASKER CERTIFIED SOLUTION
Avatar of Member_2_6373554
Member_2_6373554

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial