String zeroPad(int number) { return number < 10 ? "0" + number : String.valueOf(number); }
You could just have done String.format("%02d", number);