just23
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.