Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HeadFirstJava - SimpleDotCom

 
Negru Ionut Valentin
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:




and



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é
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the error message carefully :
SimpleDotComGame.java:14: 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 ?
 
kannan vinayagam Duraiswamy
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see the method name in the GeameHelper : it is getUerInput not getUserInput
 
Negru Ionut Valentin
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys ... it was that typing error ... i thought it was something like that but i didn't discovered it.

Thanks again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic