Java examples for java.util:Year
last Day Of Year
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static void main(String[] argv) throws Exception { Date currentDate = new Date(); System.out.println(lastDayOfYear(currentDate)); }//w w w.j av a2 s . c o m public final static Date lastDayOfYear(Date currentDate) { Calendar calendar = Calendar.getInstance(); calendar.setTime(currentDate); calendar.set(Calendar.MONTH, 11); calendar.set(Calendar.DAY_OF_MONTH, 31); return calendar.getTime(); } }