Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java leap years


public static boolean isLeapYear(int year) {
  Calendar cal = Calendar.getInstance();
  cal.set(Calendar.YEAR, year);
  return cal.getActualMaximum(Calendar.DAY_OF_YEAR) > 365;
}

Source by coders911.org #
 
PREVIOUS NEXT
Tagged: #java #leap #years
ADD COMMENT
Topic
Name
2+6 =