java get data today code example
Example 1: java get current date
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
Date date = new Date();
System.out.println(formatter.format(date));
// ------------------------
System.out.println(LocalDate.now());
Example 2: get today date in java 8
LocalDate localDate = LocalDate.now();