GregorianCalendar Help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: GregorianCalendar Help

  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);

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center