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 + "天");

}

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-01-31
  • 2022-12-23
  • 2021-07-13
  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2021-08-03
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案