Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

JAVA operators

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
No votes yet
Share this
1 answer
sudhanshu_841's picture
String hex = "FFFFFE";
         BigInteger value =new BigInteger(hex, 16);
         System.out.println(value);

hope this helps..

Regards,
Sudhanshu
No votes yet