I haven't read the book, but from other posts on here I know some of the code samples are not complete. Check the text of the book to see if this is an example of that. You could also search these forums to see if other people have had similar problems. I think I remember the battleships program being mentioned before but I'm not sure what the exact problem was. If none of that helps, post the error messages you are getting and the bit of your code they refer to and I'm sure someone will be able to spot the problem.
also, post the EXACT text of the errors. that actually tells you what's wrong, once you learn how to read it (which isn't really all that hard).
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Oct 04, 2007
I went to the site and downloaded the JAR file and it didn't work, but after fiddling around for a while.. It's magically started working although I'm not 100% sure why. Yea', I know how to read the errors the compiler throws at me, spent a lot of time on google searching for what errors I got meant.
I'll keep trying to figure out what changed so if anyone has similar problems, they'll know how to fix it!