my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HeadFirstJava - SimpleDotCom " Watch "HeadFirstJava - SimpleDotCom " New topic
Author

HeadFirstJava - SimpleDotCom

Negru Ionut Valentin
Greenhorn

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:




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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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 ?


[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


Kannan.DV
Negru Ionut Valentin
Greenhorn

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: http://aspose.com/file-tools
 
subject: HeadFirstJava - SimpleDotCom
 
Similar Threads
import java.io.*; problem
Hi All, While working with Head first java, I got into a problem, please help me to solve this.....
This code of mine is not working, Please help.... i am studying from Head first java
getting exception in thread "main" java.lang.NoSuchMethodError: main error message
HFJ 2nd - Problem with SimpleDotCom