Originally posted by Shiva Mohan:
System.out.println(Long.toString(15, 16)); is printing f3.
But
System.out.println("---->"+Long.toString(11110011,16)); is not printing F3.Instead it is printing a9867b.what is this value?please help me.
The first parameter is the long value to be converted to a
string. In your case, it is a value of 15 (in decimal format). This should convert to a value of "f" in base 16 format.
In the second case, it is a value of 11110011 (also in decimal format). Which converts to a value of "a9867b" in base 16 format.
Henry