Data Type Java

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public final class DateUtils {
  public static Date getLastWeek() {
    GregorianCalendar dayBeforeThisWeek = new GregorianCalendar();
    int dayFromMonday = (dayBeforeThisWeek.get(Calendar.DAY_OF_WEEK) + 7 - Calendar.MONDAY) % 7;
    dayBeforeThisWeek.add(Calendar.DATE, -dayFromMonday-1);
    return dayBeforeThisWeek.getTime();
  }
}