Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class Main {
    public static void main(String[] args) {
        DateFormat df = DateFormat.getDateInstance();
        if (df instanceof SimpleDateFormat) {
            SimpleDateFormat sdf = (SimpleDateFormat) df;
            System.out.println(sdf.toPattern());
        } else {
            System.out.println("sorry");
        }
    }
}