Is there any easy way to do that without creating my own methods? I only find this:
static int parseInt(String s, int radix)
Which is told to be good only for 2, 10, 8 and 16. What about the rest?
parseInt
is for converting from a string representation of a number with a particular radix, to an integer value. If you want to convert a number to a representation in a particular radix, use
Integer.toString(n, radix);
where radix
can be anything from 2 to 36. After that we run out of letters.