0 votes
in Education by (55.6k points)

How will you get the current date using local datetime api of java8 in Java8?

1 Answer

0 votes
by (55.6k points)

How will you get the current date using local datetime api of java8 in Java8?

Following code gets the current date using local datetime api -

//Get the current date

LocalDate today = LocalDate.now();

System.out.println("Current date: " + today);

...