Comment on Tutorial - The switch Statement example in Java By Kamini



Comment Added by : Nick Scroggs

Comment Added at : 2013-03-26 01:44:04

Comment on Tutorial : The switch Statement example in Java By Kamini
@Jai Shankar K

I'm guessing you are not really that familiar with leap years. That's not to be unexpected, after all you're probably not over 113 years old, hell maybe you are not ever 13 years old. However the person who wrote this example knows that when a year is divisible by 100 (ie 500, 1600, 1700, 2000 etc) it may or may not be a leap year. If leap years were every 4 years, then over hundreds or years we would add too much time. Every 400 years our calendar would be off by an additional 3 days. To adjust for this, if a year is divisible by 100 and not by 400 then it is NOT a leap year. If the last two numbers are '00', then only years which are divisible by 400 are leap years. So, only the years 400, 800, 1200, 1600, and 2000 were leap years. 1500, 1700, 1800, and 1900 were not.
There are also leap seconds which are added every now and again for fine tuning.


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Very Nice and Concrete Explanation ..
View Tutorial          By: Parvesh at 2009-09-18 11:11:00

2. thank you..!!
really very helpful...

View Tutorial          By: sneha at 2012-01-30 18:01:16

3. This tutorial is very much useful for me to develo
View Tutorial          By: R. Lawrance at 2009-07-26 22:03:15

4. thanx very much...
View Tutorial          By: Rajesh at 2015-10-09 08:57:36

5. My Page URL- http://localhost:8080/WebApplication1
View Tutorial          By: aMIT sURI at 2012-05-12 10:43:21

6. Can any help me to get Second line,Second word in
View Tutorial          By: Ramesh at 2012-07-21 11:12:05

7. two of them are equal and third one is less than b
View Tutorial          By: nani at 2011-10-28 10:55:58

8. its superb
View Tutorial          By: chotu jain at 2011-05-24 08:47:22

9. is it possible to import one user package inside a
View Tutorial          By: vivek imman at 2011-11-01 12:09:40

10. Thanks very much, this helped alot.
View Tutorial          By: Steve at 2012-10-09 21:09:16