简体   繁体   English

将int数组转换为十六进制数组

[英]Convert int array to hex array

I have array of int of 200. I want convert this array to hex array and hex array in to output as string. 我的整数数组为200。我想将此数组转换为十六进制数组,然后将十六进制数组转换为字符串输出。 How can I do this one 我该怎么办

Help appreciated! 帮助赞赏!

You can use Integer.toHexString(num) method. 您可以使用Integer.toHexString(num)方法。

Eg 例如

for(int i=0; i < intArray.length; i++){
    stringArray[i] = Integer.toHexString(intArray[i]);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM