String.valueOf(Calendar.getInstance().get(Calendar.MONTH) + 1) return 1 instead of 01. How can I use this that result will be 02, 03, 04 and not 2, 3, 4
I know that Calendar.MONTH return numbers from 0 to 11
http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html#MONTH
This is a formatting issue. Why not investigate SimpleDateFormat ? Or String.format() ?
(note that
SimpleDateFormathas thread-safety issues and Joda-Time is a recommended alternative)