Java SQL Date create from String as "2000-01-12"

Description

Java SQL Date create from String as "2000-01-12"

import java.sql.Date;
import java.time.LocalDate;


public class Main {
  public static void main(String[] args) {
     Date date = Date.valueOf("2000-01-12");
     System.out.println("date:"+date);
     /*from w w  w . j  a v a  2s .c  o  m*/

  }
}



PreviousNext

Related