This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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: