Decimal to Hexadecimal Converter in Java

后端 未结 13 2402
有刺的猬
有刺的猬 2020-12-03 13:57

I have a homework assignment where I need to do three-way conversion between decimal, binary and hexadecimal. The function I need help with is converting a decimal into a he

13条回答
  •  醉酒成梦
    2020-12-03 14:32

    The easiest way to do this is:

    String hexadecimalString = String.format("%x", integerValue);
    

提交回复
热议问题