Here you can find the source of getDate(int year, int month)
public static String getDate(int year, int month)
//package com.java2s; public class Main { public static String getDate(int year, int month) { String date = null;// w ww . ja v a 2 s.c o m String a = String.valueOf(year); String b = String.valueOf(month); if (month > 9) { date = a + b; } else { date = a + "0" + b; } return date; } }