Java LocalDate parse from String like "2018-01-10"

Description

Java LocalDate parse from String like "2018-01-10"

import java.time.LocalDate;

public class Main {
   public static void main(String[] args) {
      // Parse a LocalDate in ISO format
      LocalDate ld1 = LocalDate.parse("2018-01-10");
      System.out.println("ld1: " + ld1);
   }//from w ww. j  a  v a  2 s.  co  m
}



PreviousNext

Related