T
tyshanchn
hi ,
what is the value of
-8>>-1
-8<<-1
it will be like
public class BitOperation {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(-8 << -1);
System.out.println(-8 >> -1);
}
}
the result is
0
-1
but if not -8, what will be the value?and why???
what is the value of
-8>>-1
-8<<-1
it will be like
public class BitOperation {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(-8 << -1);
System.out.println(-8 >> -1);
}
}
the result is
0
-1
but if not -8, what will be the value?and why???