string to hex value

前端 未结 4 2007
粉色の甜心
粉色の甜心 2021-01-05 18:53

Is there any java utility to convert string to hex value (integer) ?

4条回答
  •  借酒劲吻你
    2021-01-05 19:32

    Try some of the methods of the Integer class:

    Integer.toHexString(Integer.parseInt(myString, 10))
    

    This assumes that your original string is an integer base ten.

提交回复
热议问题