Here you can find the source of getCalendar(int day, int month, int year)
private static Calendar getCalendar(int day, int month, int year)
//package com.java2s; import java.util.*; import static java.util.Calendar.*; public class Main { private static Calendar getCalendar(int day, int month, int year) { Calendar cal = getInstance(new SimpleTimeZone(0, "GMT")); cal.clear();/*from w w w .j a v a 2 s . co m*/ cal.set(YEAR, year); cal.set(MONTH, month); cal.set(DAY_OF_MONTH, day); return cal; } }