1package com.mkyong.date;
2
3import java.time.LocalDate;
4
5public class JavaDateExample1 {
6
7 public static void main(String[] args) {
8
9 String date = "2016-08-16";
10
11 //default, ISO_LOCAL_DATE
12 LocalDate localDate = LocalDate.parse(date);
13
14 System.out.println(localDate);
15
16 }
17}
18Copy