last day of the month in java with joda-time
I use the joda-time library wich simplifie greatly the use of date in java.
import org.joda.time.DateTime;public class LastDayOfTheMonthDemo {
public static void main(String[] args) {
DateTime dt = new DateTime();
DateTime last = dt.dayOfMonth().withMaximumValue();
System.out.println(last.toString());
}
}