Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

leap year program in java

public static boolean isLeapYear(int year) {
  if (year % 4 != 0) {
    return false;
  } else if (year % 400 == 0) {
    return true;
  } else if (year % 100 == 0) {
    return false;
  } else {
    return true;
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #leap #year #program #java
ADD COMMENT
Topic
Name
4+6 =