Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static final String DATE_FORMAT_MD = "MM-dd";

    public static String getMMdd(Date date) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT_MD);
        return simpleDateFormat.format(date);
    }
}