MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.Date;
import java.util.Locale;

/**
 Output:
    
 The date is Fri May 26 11:08:34 PDT 2006
    
     
 * */

public class MainClass {
    public static void main(String args[]) throws Exception {

        Date date = new Date();
        System.out.printf(Locale.CHINA, "The date is %tc\n", date);

    }
}