Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static void main(String args[]) throws Exception {
        SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd");
        String input = "2020-11-11";
        System.out.print(input + " Parses as ");
        Date t = ft.parse(input);
        System.out.println(t);
    }
}