0

CHALLENGE : LEAP YEAR

make a code in java to check weather given year is leap year or not. ( warning : without any if, else..if, nested if statement )

28th Sep 2017, 7:30 AM
RANDOM1
RANDOM1 - avatar
3 Antworten
29th Sep 2017, 3:16 AM
Алексей Спиридонов
Алексей Спиридонов - avatar
+ 1
public boolean isLeapYear(int y){ return y>0 && y%4 && (!(y%100) || y%400); }
28th Sep 2017, 8:26 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
- 1
heres mine in one line.... input the year True=leapyear False=not a leapyear https://code.sololearn.com/c4ezxk022VXS/?ref=app
30th Sep 2017, 7:09 AM
sayan chandra
sayan chandra - avatar