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[] argv) throws Exception {
        Date today = new Date();

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

    }
}