20
任务
Java Collections, 第 10 级, 课程 10
Working with Java 8's DateTime API
Complete this task using Java 8's DateTime API.
Implement the printDate(String date) method.
It must accept a date as an argument (in one of 3 formats).
20
任务
Java Collections, 第 10 级, 课程 10
Working with Java 8's DateTime API
Complete this task using Java 8's DateTime API.
Implement the printDate(String date) method.
It must accept a date as an argument (in one of 3 formats).
10
任务
Java Collections, 第 10 级, 课程 10
Buon Compleanno!
Implement the getWeekdayOfBirthday method.
The method must return the day of the week for a birthday in a given year (past, present, or future), in Italian.
See the main method for example date formats.
10
任务
Java Collections, 第 10 级, 课程 10
Useful methods of the DateTime API
Java 8's DateTime API implements many classes and methods that greatly simplify working with
dates and times.
Let's implement a few simple methods to get to know them better.
1) The isLeap method must accept a date and return true if the year is a leap year, otherwise it must return false.