Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {

    public static void main(String args[]) {
        Formatter fmt = new Formatter();
        Calendar cal = Calendar.getInstance();
        fmt = new Formatter();
        fmt.format("Default locale: %tc\n", cal);

        fmt.format(Locale.GERMAN, "For Locale.GERMAN: %tc\n", cal);
        fmt.format(Locale.ITALY, "For Locale.ITALY: %tc\n", cal);
        fmt.format(Locale.FRANCE, "For Locale.FRANCE: %tc\n", cal);
        System.out.println(fmt);
    }
}