The answer is the letter D, in the second line instance 32 which is not a valid day, the code compiles because the Local.Date.of method accepts any integer number, but if it is not in the range it throws an exception.
The correct answer is D
"A DateTimeException is thrown at runtime."
Exception in thread "main" java.time.DateTimeException: Invalid value for DayOfMonth (valid values 1 - 28/31): 32
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DJava
Highly Voted 5 years, 6 months agoMPignaProTech
Most Recent 1 month, 4 weeks agoakbiyik
2 years agoiSnover
2 years, 2 months agoSurendra88
3 years, 4 months agohoussem94
4 years, 4 months agov323rs
4 years, 11 months agoletmein2
5 years, 3 months agorasifer
5 years, 5 months ago