Here you can find the source of getMonthStr(String str)
public static String getMonthStr(String str)
//package com.java2s; //License from project: Apache License public class Main { public static String getMonthStr(String str) { String[] monthOfYear = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; if ("01".equals(str)) { str = monthOfYear[0];//ww w. jav a 2 s. c o m } else if ("02".equals(str)) { str = monthOfYear[1]; } else if ("03".equals(str)) { str = monthOfYear[2]; } else if ("04".equals(str)) { str = monthOfYear[3]; } else if ("05".equals(str)) { str = monthOfYear[4]; } else if ("06".equals(str)) { str = monthOfYear[5]; } else if ("07".equals(str)) { str = monthOfYear[6]; } else if ("08".equals(str)) { str = monthOfYear[7]; } else if ("09".equals(str)) { str = monthOfYear[8]; } else if ("10".equals(str)) { str = monthOfYear[9]; } else if ("11".equals(str)) { str = monthOfYear[10]; } else if ("12".equals(str)) { str = monthOfYear[11]; } else { str = "ERROR"; } return str; } }