This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes Assignment 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Assignment 3" Watch "Assignment 3" New topic

Assignment 3

Eviano Afiemo

Joined: Mar 20, 2001
Posts: 21
Hi guys
I can't seem to get my head round the logic behind assignment Java3(Leap).
This is how I understand it:
[i]A particular year is considered to be a leap year if:
it is divisible by 4; but is not divisible by 400 and 100.[i]
Could some one tell me if I've got the right idea or if not please correct me.
confused: confused:
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
You want to post this in the Cattle Drive forum; that's what it's for. I'll move it there now...

"I'm not back." - Bill Harding, Twister
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
A year is always a leap year if it is divisible by 400. A year is also a leap year if it is divisible by 4, but not divisible by 100.
Matthew Phillips

Matthew Phillips
Eviano Afiemo

Joined: Mar 20, 2001
Posts: 21
I'm sorry, I thought that's where I posted to.
Thanks Matthew...
[This message has been edited by Eviano Afiemo (edited April 03, 2001).]
I agree. Here's the link:
subject: Assignment 3
Similar Threads
Leap assignment question
Java-3 Leap Question
Assignment 1.3 - conflicting Specs.
Assignment 3 Confusion
Leap Year Logic