rss
Twitter Delicious Facebook Digg Stumbleupon Favorites

Friday, October 7, 2011

Leap year


A leap year (or intercalary or bissextile year) is a year containing one extra day (or, in the case of lunisolar calendars, a month) in order to keep the calendar year synchronized with the astronomical or seasonal year.Because seasons and astronomical events do not repeat in a whole number of days, a calendar that had the same number of days in each year would, over time, drift with respect to the event it was supposed to track. By occasionally inserting (or intercalating) an additional day or month into the year, the drift can be corrected. A year that is not a leap year is called a common year.
For example, in the Gregorian calendar (a common solar calendar), February in a leap year has 29 days instead of the usual 28, so the year lasts 366 days instead of the usual 365. Similarly, in theHebrew calendar (a lunisolar calendar), a 13th lunar month is added seven times every 19 years to the twelve lunar months in its common years to keep its calendar year from drifting through the seasons too rapidly.

class  Leapyear
{
 public static void main(String[] args)
 {
  int n=2012;
  if (n%4==0){
  System.out.println("The given year is a leap year");
   }
  else{
  System.out.println("This is not a leap year");
 }
}
}

0 comments:

Post a Comment

Powered by Blogger.