What is the radix parameter in Java, and how does it work?

后端 未结 6 1057
日久生厌
日久生厌 2020-11-29 05:36

I understand that radix for the function Integer.parseInt() is the base to convert the string into. Shouldn\'t 11 base 10 converted with a radix/base 16 be a

6条回答
  •  无人及你
    2020-11-29 06:08

    It's actually taking 11 in hex and converting it to decimal. So for example if you had the same code but with "A" in the string, it would output 10.

提交回复
热议问题