fork(3) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.time.LocalDate;
  4. import java.time.format.DateTimeFormatter;
  5.  
  6. /* Name of the class has to be "Main" only if the class is public. */
  7. class Ideone
  8. {
  9. public static void main (String[] args) throws java.lang.Exception
  10. {
  11. LocalDate dt1 = LocalDate.parse("15/08/2020", DateTimeFormatter.ofPattern("dd/MM/yyyy"));
  12.  
  13. DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
  14.  
  15. System.out.println(dt1.format(formatter));
  16. }
  17. }
Success #stdin #stdout 0.08s 34908KB
stdin
Standard input is empty
stdout
15/08/2020