nConsider a method that determines if a year is a leap year.
nThe Gregorian
calendar stipulates that a year is a leap
year if it is divisible by 4, unless it is
also divisible by 100, in which case it is a
leap year if and only if it is divisible by
400. For example, 1900 is not a leap
year, but 2000 is.
n
n(year % 100 != 0 && year % 4 == 0)
||
n(year % 100 == 0 && year % 400 == 0)