Primitive variables can not have null values. boolean is a primitive.
reference variables can have null values and that will cause the exception.
Add some printlns to print out the values of all...
Type: Posts; User: Norm
Primitive variables can not have null values. boolean is a primitive.
reference variables can have null values and that will cause the exception.
Add some printlns to print out the values of all...
Yes, that is a lot easier to read and understand.
Have you found the null variable and then found out why it doesn't not have a valid value?
Please edit your post, select the code and wrap it with code tags.
See:BB Code List - Java Programming Forums
Or press the Go Advanced and use the #icon
If you are getting a NullPointerException you need to track down why the variable does not have a valid value.
Please explain why you think there is a problem. Do you see an error message or bad output or what?
At line 36 in MiniMajorProject there is a variable with a null value. Look at that line of code and see what variable is there that is null and then backtrack in your code to see why that variable...
Please copy and paste here the full text of the error message.