For future reference, please flank your code with the tags. I have edited your post above to reflect this.

Your code mentions a NullPointerException, this is thrown because the variable...