⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e375. determining the number of days in a month.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
This example uses the Calendar class to determine the number of days in the month of a particular year. 
    // Create a calendar object of the desired month
    Calendar cal = new GregorianCalendar(1999, Calendar.FEBRUARY, 1);
    
    // Get the number of days in that month
    int days = cal.getActualMaximum(Calendar.DAY_OF_MONTH); // 28
    
    // Try month in a leap year
    cal = new GregorianCalendar(2000, Calendar.FEBRUARY, 1);
    days = cal.getActualMaximum(Calendar.DAY_OF_MONTH);     // 29

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -