I try to compile the code with the netbeans compiler
I got an error:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static variable this cannot be referenced from a static context
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
It's the code of the book of head first java. can someone tell me what I am doing wrong?
The code you posted is not what is in Head First Java. You have the Book and BooksTestDrive classes as inner classes to Main, which is not how it is on pg. 63, and I'm not even sure what you've posted will compile because you are missing a }.
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
Joined: Aug 10, 2010
I saw I missed a }
on page 68 of the second edition is the solution of the problem.
Now I got another error can you help me?