DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    7

    GregorianCalendar Help

    hiya all i am trying to implement a GregorianCalendar into my work for an email organiser but tis not working i get

    Code:
    ava.lang.NullPointerException
    	at Message.toString(Message.java:79)
    	at java.lang.String.valueOf(String.java:2177)
    	at java.lang.StringBuffer.append(StringBuffer.java:361)
    	at Inbox.toString(Inbox.java:22)
    	at java.lang.String.valueOf(String.java:2177)
    	at java.io.PrintStream.print(PrintStream.java:462)
    	at java.io.PrintStream.println(PrintStream.java:599)
    	at EmailOrganiser.main(EmailOrganiser.java:33)
    Exception in thread "main"
    Here is a link to my files www.mikecotton.com/java_files.zip and wud be very pleased if somone could have a look and tell me where i am going wrong

    Thanx

  2. #2
    Join Date
    Nov 2004
    Location
    Minnesota
    Posts
    99
    You didn't initialize the MyTime object in the Message constructor:
    Code:
    this.timeReceived = timeReceived;
    timeReceived is not passed in. I think you really wanted to initialize it with:
    Code:
    this.timeReceived = new MyTime(day, month, year, hour, minute);

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links