Java examples for java.util:Month
get month Day string as MMdd
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static void main(String[] argv) throws Exception { System.out.println(monthDay()); }/*from w ww. j av a 2s .com*/ public static String monthDay() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("MMdd"); return sdf.format(cal.getTime()); } }