import java.time.LocalDate;
import java.time.Month;
import java.time.format.DateTimeFormatter;
import java.time.Duration;
import static java.time.temporal.TemporalAdjusters.lastDayOfYear;
class Ideone
{
{
LocalDate hoje = LocalDate.now();
LocalDate faltaFimDoAno = hoje.with(lastDayOfYear());
long dias = Duration.between(hoje.atStartOfDay(), faltaFimDoAno.atStartOfDay()).toDays();
System.
out.
println("Hoje: " + hoje.
format(DateTimeFormatter.
ofPattern("dd/MM/yyyy")));
System.
out.
println("Ultimo dia do ano: " + faltaFimDoAno.
format(DateTimeFormatter.
ofPattern("dd/MM/yyyy")));
System.
out.
println("Quantidade de dias para o fim do ano: " + dias
); }
}
aW1wb3J0IGphdmEudGltZS5Mb2NhbERhdGU7CmltcG9ydCBqYXZhLnRpbWUuTW9udGg7CmltcG9ydCBqYXZhLnRpbWUuZm9ybWF0LkRhdGVUaW1lRm9ybWF0dGVyOwppbXBvcnQgamF2YS50aW1lLkR1cmF0aW9uOwppbXBvcnQgc3RhdGljIGphdmEudGltZS50ZW1wb3JhbC5UZW1wb3JhbEFkanVzdGVycy5sYXN0RGF5T2ZZZWFyOwoKY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewogICAgICAgIExvY2FsRGF0ZSBob2plID0gTG9jYWxEYXRlLm5vdygpOwogICAgICAgIExvY2FsRGF0ZSBmYWx0YUZpbURvQW5vID0gaG9qZS53aXRoKGxhc3REYXlPZlllYXIoKSk7CiAgIAogICAgICAgIGxvbmcgZGlhcyA9IER1cmF0aW9uLmJldHdlZW4oaG9qZS5hdFN0YXJ0T2ZEYXkoKSwgZmFsdGFGaW1Eb0Fuby5hdFN0YXJ0T2ZEYXkoKSkudG9EYXlzKCk7CgogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiSG9qZTogIiArIGhvamUuZm9ybWF0KERhdGVUaW1lRm9ybWF0dGVyLm9mUGF0dGVybigiZGQvTU0veXl5eSIpKSk7CgogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiVWx0aW1vIGRpYSBkbyBhbm86ICIgKyBmYWx0YUZpbURvQW5vLmZvcm1hdChEYXRlVGltZUZvcm1hdHRlci5vZlBhdHRlcm4oImRkL01NL3l5eXkiKSkpOwogICAgICAgIAogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiUXVhbnRpZGFkZSBkZSBkaWFzIHBhcmEgbyBmaW0gZG8gYW5vOiAiICsgZGlhcyk7Cgl9Cn0=