📄 testnumber.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package number;/** * * @author china */public class TestNumber { /** * @param args the command line arguments */ public static void isLeapYear(int year) { boolean n1=(year%4==0); boolean n2=(year%100==0); boolean n3=(year%400==0); if((n1==true&&n2!=true)|| (n2==true&&n3==true)) { System.out.println(year+"年是瑞年"); } else { System.out.println(year+"年不是瑞年"); } } public static void main(String[] args) { // TODO code application logic here isLeapYear(1900); isLeapYear(1904); isLeapYear(2000); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -