wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes Null dates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Null dates" Watch "Null dates" New topic
Author

Null dates

Giuseppa Cefalu
Ranch Hand

Joined: Jul 15, 2011
Posts: 121
In the code below a date must be a date object and therefore date cannot be initiliazed to zero. I have to use a date object becuase the setValue method only takes a date. If I initialize the date to null, i get an exception in thread main null pointer exception. Is there any workaround so that one can initialize the date to 0 or null and still gat a date object that can be accepted by the setValueAt() method? Thank you

Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3900
    
  18

Sounds like a recipe for disaster. Why are you setting the date if you have no date to set?


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Giuseppa Cefalu
Ranch Hand

Joined: Jul 15, 2011
Posts: 121
Thank you very much!!! Your comment was very helpful. All I need is

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Null dates
 
It's not a secret anymore!