- 1
Integer b = Integer.valueOf("444",16); And int b = Integer.parseInt("444",16); Both returns 1092. Can anyone explain how?
"444" is string & 16 is radix, which converts string into integer
2 Respostas
+ 4
0x444 is hexadecimal (base 16) representation of decimal 1092, since you specify the radix (base) to be 16, that is what you get from the conversion ->1092. Hope it makes sense : )
https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html
+ 1
got it. thanks!