This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Number of days Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Number of days" Watch "Number of days" New topic
Author

Number of days

adel alraheem
Greenhorn

Joined: Nov 05, 2012
Posts: 1
please I am having problem doing this method and call it, I am using another class called (Date.java), i have done the first two method but not this one so will you guys please help me to solve it

/**
* Computes and returns the number of days between two dates, counting the
* end date but not the start date. E.g., the number of days between
* 11/1/2012 and 11/5/2012 is 4, not 5.
*
* Precondition: The start date must occur on or before the end date.
*
* @param start the earlier of the two dates
* @param end the later of the two dates
*
* @return the number of days elapsed between the start date and the end
* date
*/
public int countingTheDays(Date start, Date end) {
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Hi, and welcome to the Ranch!

Here are a few points that will help you get the most out of your experience here.

1) TellTheDetails(←click). We don't know what specific problems you're having if you don't tell ut.

2) ShowSomeEffort(←click). This goes along with #1. Take your best shot, do as much as you can, and then ask specific questions about the parts that are tripping you up.

3) When posting code, UseCodeTags(←click) so that it will be readable.
 
GeeCON Prague 2014
 
subject: Number of days