package test;
import java.util.Calendar;
public class test2 {
/**
* @param args
*/
public static void main(String[] args) {
int year = 2017;
int month = 3;
Calendar c = Calendar.getInstance();
c.set(year, month, 0); //输入类型为int类型
int dayOfMonth = c.get(Calendar.DAY_OF_MONTH);
System.out.println(year + "年" + month + "月有" + dayOfMonth + "天");
}
}