I use this code
short s = (short) Integer.parseInt("3321",16);
to convert from 3321
to 13089
How can I make the inverse and convert from 13089
to 3321
?
Integer
provides a method for this.
String out = Integer.toHexString(13089);
out
will have the value "3321"
.