NullPointerException is a RuntimeException which means you don't have to catch it in your code.
Therefore the compiler didn't complain.
Where did you get it? Figure that out and check whether whatever you're using there indeed isn't null before continuing.
If you don't know what a NullPointerException is I'd advise you to stick to simpler programs than what you're attempting to create for now.
Reputation Points: 1658
Solved Threads: 331
duckman
Offline 7,719 posts
since Nov 2004