Checking whether a year is leap or not

good example for the biginners
good example for the biginners

real leap years
Your leap year example gives false results for the years 1900, 2100 and others. The leap year rules are: 1. Years that are multiples of 4 are leap years, except for the following special years. 2. Years that are mutliples of 100 are not leap year

This Program Dose Not Meet All The Conditions For A Leap Year...

Hi
Your leap year example gives false results for the years 1900, 2100 and others. The leap year rules are: 1. Years that are multiples of 4 are leap years, except for the following special years. 2. Years that are mutliples of 100 are not leap year

Condition insufficient
this condition is not sufficient for century years.it shud also b divisible by 400

wrong
The leap year is the year that is divided by the integer 4 and isn't divided by 100 or is divided by 400. So: if ((n%4==0 && n%100 != 0) || n%400 == 0){ System.out.println("The given year is a leap year"); } else{ System.o

Best Site
this is best site for learn java progarmming...

logic of leap year
function isLeapYear (year): if ((year modulo 4 is 0) and (year modulo 100 is not 0)) or (year modulo 400 is 0) then true else false

There is error in your logic....
Hi, My name is Vishal...I think the logic you have given for leap year i.e. (year%4) is not enough to decide whether a year is leap year or not.... Because 1700, 1800, 1900 These are not leap years but still are divisible by 4.... Here is the

help
Sir , I m student of software engneering plz help me to complete some project .or send some project sample kindly request student thnks ur student

java tutorials
send me some more simple programs on my e-mail id ankitsre.jain08@gmail.com

it worked with some modification
well this java code was a success though i had to modify it to suite my need of generating a given number of leap years ahead of the current year

Checking whether a year is leap or not-Correction
public class Example { public void find(int n) { if((n%4==0&&n%100!=0)||(n%400==0)) { System.out.println("Leap Year") ; } else { System.out.println("Not Leap Year") ;

Related Tutorial and Articles
Java Beginners

Good tutorials for beginners in Java
in details about good tutorials for beginners in Java with example? Thanks.   ...Good tutorials for beginners in Java   Hi, I am beginners in Java... the various beginners tutorials related to Java http://www.roseindia.net/java/beginners

Java Beginners

which data structure is good in java..? - Java Beginners
which data structure is good in java..?  Hi frends, Actually i... anyone give me good example how that best technique i can use in my programs... and vector ...etc........ i wanted to know, which technique is good to store

Java Beginners

mahesh want to know java with good understanding
mahesh want to know java with good understanding  I need to know... an example program and it's output also.please teach me...   Java Beans...-counter.shtml http://www.roseindia.net/jsp/java-bean-example-jsp.shtml http

Java Beginners

array example - Java Beginners
solution, since the fundamental problem is that an array isn't really a good idea... i cannot solve this example

Java Beginners

Hi good afternoon
Hi good afternoon  write a java program that Implement an array ADT with following operations: - a. Insert b. Delete c. Number of elements d. Display all elements e. Is Empty

Java Beginners

HOW TO BECOME A GOOD PROGRAMMER
HOW TO BECOME A GOOD PROGRAMMER  I want to know how to become good programmer   Hi Friend, Please go through the following link... learn java easily and make a command over core java to proceed further. Thanks

Java Interview Questions

Beginners in Java
tutorials for beginners in Java with example? Thanks.   Hi, want to be command over Java, you should go on the link and follow the various beginners...Beginners in Java  Hi, I am beginners in Java, can someone help me

Swing AWT

Good Looking Java Charts and Graphs
Good Looking Java Charts and Graphs  Is there a java chart library that will generate charts and graphs with the quality of visifire or fusion charts? The JFreeChart graph quality is not professional looking. Unless it can

Hibernate Questions