employer cover photo
employer logo

Faithlife Interview Question

Create a function given a year to determine if it is a leap year.

Interview Answer

Anonymous

Mar 3, 2017

public boolean isLeap(int year){ if(year % 100 == 0){ return year % 400 == 0; } else{ return year % 4 == 0; } }