Java's unsigned, shift-right operator, >>>, always shifts zeros into the high-order bit.
public class Main {
public static void main(String[] argv) {
int a = -1;
a = a >>> 24;
System.out.println("a is " + a);
}
}
The output:
a is 255
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |