code:
class
Test {
public static void main(
String arg[])
{
byte i=-42;
int n=i>>4;//line1 -42/2power4
byte l=12;
int m=12>>4;//line2 12/2power4
byte j=34;
int k=j>>3;//line3 34/2power3
System.out.println(n+""+m+""+k);
}
}
output:-3 //-42/2power4 //confuse
:0// 12/2power4 //ok
:4 //34/2power3 //ok
Respected sir
for line1 after calculation
how this result come -3 i think it -2.If
i performe this with 42 the
result is 2, is the result is round.