Here you can find the source of getDay()
public static int getDay()
//package com.java2s; import java.util.Calendar; public class Main { public static int getDay() { return Calendar.getInstance().get(Calendar.DAY_OF_MONTH); }/*from ww w . java 2 s . c o m*/ }