The Answer to Life, the Universe, and Everything

Friday, September 08, 2006

Java :: Leap Year

Yes. I recovered all the photos of memory from the S/W crashed HD. I install picasa2 from google and look around the ones taken for 5 years.

Time flies. Here is the photo 1 year ago @ Italy where the family of my sister in law lives.

Good memories of pizza , mozzarella and flash back ;-)

These days I'm bussy @ work and not many time for the dev @ home. Also looking for the good server host to rent the space for the Ajax server side appli. Anyway I don't have nether time nor money ;-( Need to wait for the next month...

The formula of calculating the leap year is very simple but easy to forget. Just for a note.

/**
* This is the method to check the leap year
* @param year the year you want to check if the leap year
* @return true:leap year false: not the leap year
*/
public static boolean isLeapYear(int year){
boolean result = false;
if ((year % 4 == 0 && year % 100 != 0) (year % 400 == 0)) {
result = true;
}
return result;
}

No comments: