This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes HFJ 2nd - Problem with SimpleDotCom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HFJ 2nd - Problem with SimpleDotCom" Watch "HFJ 2nd - Problem with SimpleDotCom" New topic

HFJ 2nd - Problem with SimpleDotCom

Silvio Lobo

Joined: Apr 25, 2006
Posts: 5

I'm learning Java using Head First Java, 2nd Edition...
I'm at Chapter 5, constructing the SimpleDotCom game...

And I just got errors!

My classes:

SimpleDotCom ( 6 errors )

SimpleDotComGame ( 6 errors)

GameHelper (This one compiles fine)

What's wrong???

PS.I'm using Java 5.0 version ( jdk1.5.0_06 )

fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11956

can you post what errors you are getting? they actually tell you a lot of what's wrong.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199


Welcome to JavaRanch!

There's an extra close brace on the line before the "Out of the loop" line; that messes up everything from that point on.

If you're using Notepad or something along those lines to edit your code: this is the kind of thing that any decent programmers editor would point out to you as you type.

[Jess in Action][AskingGoodQuestions]
Silvio Lobo

Joined: Apr 25, 2006
Posts: 5
Errors from SimpleDotCom

Errors from SimpleDotComGame

Shyam Prasad Murarka
Ranch Hand

Joined: May 02, 2005
Posts: 209
Dear Reader,
Check out the "checkYourself()" method properly. You will see an if condition missing.

With Best Regards,
Shyam Prasad Murarka
Silvio Lobo

Joined: Apr 25, 2006
Posts: 5
I can't believe it!
It works fine now! ( no compile errors! )

I'm so ashamed!! The if condition was there(in the book) and I didn't see it!

But, Thanks for all!!!
I agree. Here's the link:
subject: HFJ 2nd - Problem with SimpleDotCom
It's not a secret anymore!