java三目运算能这样写吗?
return((year%4 ==0|| year%100 != 0 && year%400 == 0 )?System.out.print("闰年"):System.out.print("平年"));
如果要判断输出为闰年或平年,能直接在三目运算中写吗?