What will be the output of the code given below?
public static void main(String[] args) {
LocalDateTime date1 = LocalDateTime.now();
System.out.println(date1.isAfter(date1.plusDays(1)));
}
False
True
Error as we cannot call plusDays() method inside another method
Nothing will get printed as isAfter() method has void as it's return type
To get all Infosys Certified Java Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee