Originally posted by Silly Boy:
i got error msg:
exception in thread "main" java.lang.NullPointerException
Record.Save(Record.java:238)
how to fix it ya??
Notice that the error message is referring to line #238, and that it's in your Save method of the Record class. Now, I don't know which line is 238 in your file, since you just posted the Save method, but once you figure that out, you're halfway there--the error will be on or near that line.
Second, the error is a NullPointerException. So head to the docs and take a look at
what that means. I'm guessing that it's probably the second cause they list. So look for a case near line 238 where you're assigning something that might turn out to really be "null". It helps to ask yourself things like, "What is this line of code doing?" "Is it doing what I think it's doing?" "Are these variables and objects representing what I think they're representing?"
Third, I really didn't bother wading though your code too much because, well, it's kind of a mess. If you post your code with "CODE" tages around it, that will preserve the indenting, and make it a whole lot more readable.
Good luck ya??
- Jeff