File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Number of days" Watch "Number of days" New topic

Number of days

adel alraheem

Joined: Nov 05, 2012
Posts: 1
please I am having problem doing this method and call it, I am using another class called (, 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

Joined: Jan 03, 2004
Posts: 6109

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.
I agree. Here's the link:
subject: Number of days
jQuery in Action, 3rd edition