id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

isLeapYear


Your first task is to search the criteria for leap year (and you'd be surprised it's a little more than what most think). Define a function that when passed the value for a year, returns true if it's a leap year, false otherwise. If you are not sure where to begin, just search on wikipedia (yes, wikipedia is awesome!) for "leap year".


isLeapYear(1900) → false
isLeapYear(1800) → false
isLeapYear(1700) → false

...Save, Compile, Run (ctrl-enter)

boolean isLeapYear(int year) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 3 Post-solution available

Copyright Nick Parlante 2017 - privacy