Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Date;
import org.apache.commons.lang.time.DateFormatUtils;

public class Main {
    public static void main(String[] args) {
        Date today = new Date();

        String timestamp = DateFormatUtils.ISO_DATETIME_FORMAT.format(today);
        System.out.println("timestamp = " + timestamp);
    }
}