Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Calendar;
import java.util.Formatter;

public class Main {
    public static void main(String[] argv) throws Exception {
        Formatter fmt = new Formatter();
        Calendar cal = Calendar.getInstance();

        fmt.format("Time using 24-hour clock: %tT\n", cal);
        System.out.println(fmt);

    }
}
//Time using 24-hour clock: 15:01:46