So, I have spent the last few hours redoing the code (I am still new to Programming) and basically had to change all of it.
Now I keep getting a null pointer exception, where just a bit ago, I wasn't. Right when the user needs to hit a number 1-4 to choose the genre of the movie.
Before this, it ran fine until I asked the user if they would like to enter another movie. That throws an exception about a missing element. I am putting the code up.
Please take a look and help me to understand what happened.
I put comments in the code regarding the issue.
Thank You,
Gene @btcworker
Hi @btcworker, the issue is that:
Is not initialized you have to do:
Additionally, I would create the class "Movie" in a separate file and call it from another file with the main class.
This is not only important for readability but will also help us to extend the program later on.
Keep on coding!
P.S: I had to remove the > and the < tags because steemit doesn't like them =)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Besides that your variables in the movie should not be static
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for the help on it. The only reason I didn't create it in a separate file/class was because i thought it was supposed to be one file.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I also already posted my solution in the next challenge or if you need any more help, just ask =)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit