1.

How Will You Get The Current Date Using Local Datetime Api Of Java8?

Answer»

Following CODE GETS the current date USING local datetime API

//Get the current date
LocalDate today = LocalDate.now();
System.out.println("Current date: " + today);

Following code gets the current date using local datetime api −

//Get the current date
LocalDate today = LocalDate.now();
System.out.println("Current date: " + today);



Discussion

No Comment Found