This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
That exception that you are seeing is not a compile time but a run time exception. Learn more about exceptions here. This type of exception pops up on the stack when you try and invoke a method on a null reference. Observe carefully what you are attempting to do at the following line: