Search code examples
mobilejava-me

J2ME Integer to Hex String


I need to convert from an integer to a hexadecimal string (Character string) in Java ME (v3.2). I tried to try String.format() but that is not supported in this version. Any other alternatives? Sample code would be helpful.


Solution

  • You can use Integer.toHexString.