Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Submitted by romkb on Wed, 05/25/2011 - 20:52
Can you please explain me how to convert 0xFFFFFFE and how o/p come? ASAP
class MultByTwo {
public static void main(String args[]) {
int i;
int num = 0xFFFFFFE;
for(i=0; i<4; i++) {
num = num << 1;
System.out.println(num);
}
}
}
O/p :536870908
1073741816
2147483632
-32
1 answer
Similar entries
- Convert char to int ASCII example
- Convert char to String example
- Convert String to primitive int example
- Convert String to char array example
- Convert String to char example
- Convert char to Integer example
- Convert String to primitive double example
- Convert String to primitive byte example
- Convert Integer to primitive int example
- Convert Byte to String example

BigInteger value =new BigInteger(hex, 16);
System.out.println(value);
hope this helps..
Regards,
Sudhanshu