What code may be inserted at line 1 for successful compilation and execution of the below code?
Given:
import java.time.*;
import java.time.temporal.TemporalAdjusters;
public class Demo {
public static void main(String[] args) {
LocalDate today = LocalDate.now();
LocalDate lastDayOfYear = today.with(TemporalAdjusters.lastDayOfYear());
Period period = today.until(lastDayOfYear);
System.out.println();
System.out.println("Months remaining in the year: "+_______); // line 1
System.out.println();
}
}
period.getMonths()
Date.geetDate()
date.toString()
Period.getMonth()
To get all Infosys Certified L1 Junior Java Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee