There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
David Wismer wrote:Added a Main Sub and the code compiles and does not throw an error when ran, but also does not display anything. FYI, this is the entire code base.
This has come up a couple of times before, but it turns out we never intended for you to try to run the code listed on page 3. It was just a sample, not real working code. In our defense, we do have a note at the bottom of the page that says that, but several people have missed that note - our bad.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)

SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
. . . and then it fails because the Party class as given in the Head First book is not a complete application; it is not intended to be run at all. It says at the bottom left of page 3 it is not meant to be a tutorial, and we'll be writing real code later. It might have been a good idea to say the Party class as given there won't run; lots of people get confused about that. And lots of people get the error you have quoted, myself included, all the time, when I forget to write ".java".javac Party.java
java Party
| Don't get me started about those stupid light bulbs. |