Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.MessageFormat;
import java.util.Date;

public class Main {
    public static void main(String[] argv) throws Exception {
        Object[] params = new Object[] { new Date(), new Date(0) };
        String msg = MessageFormat.format("Today is {0,date,long} and UTC of 0 is {1,date,long}", params);

        System.out.println(msg);
    }
}