I don't know how to impliment this

I am basically making a calender, and I am stuck at this following part:
supplied variables:
private int day;
private int month;
private int year;
UML\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Description
+ before(date:Date):boolean || Returns true if this date is before date; false otherwise.
I don't understand if i am suppose to make a comparison to whetehr or not (date is compared to the supplied date).
ex: if(this.day == date.day)
will this work?
Edited by: NewInJava on May 16, 2009 7:24 AM

njb7ty wrote:
No it will not. use Date's getTime() function to get the time in milliseconds. subtract the two dates as milliseconds to determine if one comes before the other.I presume the OP is using (or is supposed to use) his/her own Date class. If not, java.util.Date has a compareTo(...) method which can be used in the before(...) method, no use in implementing it yourself.

Similar Messages

Maybe you are looking for

  • Distorted video in finished dvd.

    Hello, this is my first dvd I created. From premiere I exported a 3min long avi video. Aspesct Ratio: 720x576 Pixel aspect ratio 1,422. Copressor: Indeo Video 5.10. Interlace: Lower Field First In Encore DVD I imported the video as an asset, menu is

  • Why wont links to pages load properly?

    For instance on facebook, when i click links to games, they don't completely load. ie:http://apps.facebook.com/mobsters-two/?ref_id=100001022594476&send_timestamp=1304202088&track=newsfeed-AskFriendsToAttack-20100223-4&action=roughUp&target=100001081

  • MRP view maintenance

    Hi All, I have developed a programme to uplaod MRP views for huge number of materials across Plants. There are few material for which one strange thing is observed 1. Material A plant 1-MSTA -D not mantained, but the same is there in MM01 2..Material

  • Reading Mail from Yahoo/Gmail

    Dear All, using SAP XI/PI is it possible to read a mail sent to my Yahoo or Gmail ID? (it's not a Project requirement) Thanks and regards Bhasker

  • Re-price a PO using BAPI_PO_CHANGE

    Hi All, I want to reprice a PO using FM BAPI_PO_CHANGE. Can anyone help me on this or provide a piece of code. Thanks in advance. Regards, John