Here you can find the source of firstDayOfWeek(int year, int month)
@SuppressWarnings("deprecation") public static int firstDayOfWeek(int year, int month)
//package com.java2s; import java.util.*; public class Main { @SuppressWarnings("deprecation") public static int firstDayOfWeek(int year, int month) { Date firstDate = new Date(year - 1900, month - 1, 1); return firstDate.getDay(); }/*from ww w .ja v a 2s . c om*/ }