This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes HeadFirstJava - SimpleDotCom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HeadFirstJava - SimpleDotCom " Watch "HeadFirstJava - SimpleDotCom " New topic

HeadFirstJava - SimpleDotCom

Negru Ionut Valentin

Joined: Mar 04, 2009
Posts: 21
Hello to everyone!

I recently started reading HFJ - very good book, but now i'm stuck!

I can't compile this program - SimpleDotCom.

I have 3 classes:


I get this error when i compile the second one ... for about 2 hours i try to figure out what is the problem but i can;t .
Please help.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Read the error message carefully : cannot find symbol
symbol : method getUserInput(java.lang.String)
location: class GameHelper
String guess = helper.getUserInput("Incearca un numar: ");

Now ask yourself : What type is helper ? Is there a method called getUserInput in that class ?

[My Blog]
All roads lead to JavaRanch
kannan vinayagam Duraiswamy
Ranch Hand

Joined: Jan 12, 2009
Posts: 52
see the method name in the GeameHelper : it is getUerInput not getUserInput

Negru Ionut Valentin

Joined: Mar 04, 2009
Posts: 21
Thanks guys ... it was that typing error ... i thought it was something like that but i didn't discovered it.

Thanks again.
I agree. Here's the link:
subject: HeadFirstJava - SimpleDotCom