I'd like to convert integers from decimal base to quaternal base. What is the more concise way to do it ?
// From 4-base to decimal int d = Integer.parseInt("10", 4); // 5 // From decimal to decimal string String b10 = String.valueOf(d); // "5" // From decimal to 4-base string ? String b4 = yourMagicFunction(d, 4); // "10"
Integer.toString(Integer.parseInt(number, base1), base2);