Write code to get current Month in int number
import java.util.Calendar; public class Main { public static void main(String[] argv) { System.out.println(getNowMonth()); }//from w w w . j av a 2 s . c om public static int getNowMonth() { Calendar cc = Calendar.getInstance(); return cc.get(Calendar.MONTH) + 1; } }