Telegram Group & Telegram Channel
What is the output of the following code?
LocalDate date = LocalDate.parse("2018-04-30", DateTimeFormatter.ISO_LOCAL_DATE);
date.plusDays(2);
date.plusHours(3);
System.out.println(date.getYear() + " " + date.getMonth() + " "+ date.getDayOfMonth());


A. 2018 APRIL 2
B. 2018 APRIL 30
C. 2018 MAY 2
D. The code does not compile.
E. A runtime exception is thrown

Explanation:
A LocalDate does not have a time element. Therefore, it has no method to add hours and the code does not compile.



tg-me.com/topJavaQuizExplain/31
Create:
Last Update:

What is the output of the following code?

LocalDate date = LocalDate.parse("2018-04-30", DateTimeFormatter.ISO_LOCAL_DATE);
date.plusDays(2);
date.plusHours(3);
System.out.println(date.getYear() + " " + date.getMonth() + " "+ date.getDayOfMonth());


A. 2018 APRIL 2
B. 2018 APRIL 30
C. 2018 MAY 2
D. The code does not compile.
E. A runtime exception is thrown

Explanation:
A LocalDate does not have a time element. Therefore, it has no method to add hours and the code does not compile.

BY Explanations “Top Java Quiz Questions”


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/topJavaQuizExplain/31

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

telegram from it


Telegram Explanations “Top Java Quiz Questions”
FROM USA