Hello Zheng & Priya,
Try the following code:
class ShiftTest {
public static void main(
String args[]) {
int a = -1, b = 129, c = 12, d = 89, e = 13, f = -67;
long la = -1, lb = 129, lc = 12, ld = 89, le = 13, lf = -67;
int A = a >>> b;
int B = c << d;<br /> int C = e >> f;
System.out.println("-1 >>> 129 = "+ A);
System.out.println("12 << 89 = "+ B);<br /> System.out.println("13 >> -67 = "+ C);
long AA = la >>> lb;
long BB = lc << ld;<br /> long CC = le >> lf;
System.out.println("-1 >>> 129 = "+ AA);
System.out.println("12 << 89 = "+ BB);<br /> System.out.println("13 >> -67 = "+ CC);
}
}
Hope your doubt will be clear. But still if you have to ask some question on the output then fell free to ask.
------------------
Regards,
Raj.
-------------------------
Afforts should be Appriciated.
-------------------------