Here you can find the source of getNextMonthFirstDate(Date date)
public static Date getNextMonthFirstDate(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public final static Calendar cal = Calendar.getInstance(); public static Date getNextMonthFirstDate(Date date) { Date tmpdate = getMonthFirstDate(date); cal.setTime(tmpdate);/* w ww.j a v a 2 s . com*/ cal.add(Calendar.MONTH, 1); return new Date(cal.getTime().getTime()); } public static Date getMonthFirstDate(Date date) { Date tmpdate = new Date(date.getTime()); return tmpdate; } }