Short.parseShort(String s, int radix) exists, as does Integer.parseInt(String s, int radix) and Long.parseLong(String s, int radix).
Integer.toString(int i, int radix) and Long.toString(long l, int radix) exist.
Short.toString(short s), Integer.toString(int i) and Long.toString(long l) all exist.
So why is there no Short.toString(short s, int radix)?
(It can’t be because you can always cast your short to an int and use the Integer class’ method, the same argument could be made for getting rid that; you could always cast your int to a long and use the Long class’ version.)
Take a look at the implementation of
Short.toString(short s):So, just use
Integer. (Note that the implementation is different forIntegerandLong)