My first post on here, as only started programming java since last week using Head First Java book. I'm working on the the Chapter 5 Battleships game and just can't figure out why this piece of code is causing me an error. "error: class, interface or enum expected". I thought this maybe of been a semi-colon or something but everything seems to be in place. The code is below!
If they are all in the same package, there won't be a problem with that; otherwise you would use import statement for other classes.
Though it's a question for another topic, I would suggest you read a Java tutorial, specifically the Packages section, to get more details. I'm posting from phone now so I can't provide a link, but if you Google for it you'll find it easily.
Joined: Jun 20, 2013
I'll look into that. There seems to be a good few ones when I googled so will try a few out. Nice one!!