Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.sql.Timestamp;
import java.util.Date;

public class Main {
    public static void main(String[] args) throws Exception {
        Date date = new Date();
        System.out.println("Format To times:");
        System.out.println(date.getTime());
        Timestamp ts = new Timestamp(date.getTime());
        System.out.println(ts);
    }
}