Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalDate;
import java.time.Month;
import java.time.format.DateTimeFormatter;

public class Main {

    public static void main(String[] args) {
        LocalDate ld = LocalDate.of(2014, Month.JANUARY, 1);
        String pattern = "'New Year in'  yyyy  'is on' EEEE";
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
        String str = ld.format(formatter);
        System.out.println(str);

    }
}