*
The moose likes Beginning Java and the fly likes please help in rectifying error :Symbol not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "please help in rectifying error :Symbol not found" Watch "please help in rectifying error :Symbol not found" New topic
Author

please help in rectifying error :Symbol not found

Ankeet Maini
Greenhorn

Joined: Jul 10, 2010
Posts: 6

THE ERROR

SimpleDotComTester.java:64: cannot find symbol
symbol : method getUserInput(java.lang.String)
location: class GameHelper
String guess = h.getUserInput("Enter your choice :");
^
1 error


Please rectify this error...and tell why the heck it is coming??
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Do you have more than one GameHelper.java classes floating around? Have you compiled the GameHelper.java file before using it?

Also, when posting code here, please use code tags so that your code will retain its formatting and thus will be readable -- after all, your goal is to get as many people to read your post and understand your code as possible, right?

To do this, highlight your pasted code (please be sure that it is already formatted when you paste it into the forum; the code tags don't magically format unformatted code) and then press the code button, and your code will have tags.

Another way to do this is to manually place the tags into your code by placing the tag [code] above your pasted code and the tag [/code] below your pasted code like so:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Welcome to the Ranch! Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ankeet Maini
Greenhorn

Joined: Jul 10, 2010
Posts: 6
thnks pete...i'm new to this forum...so missed these finer technicalities..

And yes, i've compiled the GameHelper.java individually too...and no error was reported..and there is no other GameHelper.java hanging around..

I cant understand why "SimpleDotComTester" is not able to access "getUserInput()" as i have declared that under "public" specifier...

HELP HELP!!
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18988
    
  40

Ankeet Maini wrote:
I cant understand why "SimpleDotComTester" is not able to access "getUserInput()" as i have declared that under "public" specifier...


It looks like the method is declared as getUserlnput(), while it is called as getUserInput().... notice that the two names are not the same.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Ankeet Maini
Greenhorn

Joined: Jul 10, 2010
Posts: 6
Henry Wong wrote:
Ankeet Maini wrote:
I cant understand why "SimpleDotComTester" is not able to access "getUserInput()" as i have declared that under "public" specifier...


It looks like the method is declared as getUserlnput(), while it is called as getUserInput().... notice that the two names are not the same.

Henry


Please enlighten Henry...I cant cite the difference..
Ankeet Maini
Greenhorn

Joined: Jul 10, 2010
Posts: 6
Ankeet Maini wrote:
Henry Wong wrote:
Ankeet Maini wrote:
I cant understand why "SimpleDotComTester" is not able to access "getUserInput()" as i have declared that under "public" specifier...


It looks like the method is declared as getUserlnput(), while it is called as getUserInput().... notice that the two names are not the same.

Henry


Please enlighten Henry...I cant cite the difference..

Thanks a lot mate...i found it...
David Patrzeba
Greenhorn

Joined: Jun 08, 2010
Posts: 14
Your call is:



however in the GameHelper class you define that function as:



Look at the "i's" i != I.
Ankeet Maini
Greenhorn

Joined: Jul 10, 2010
Posts: 6
Thank you all!!
Ankeet Maini
Greenhorn

Joined: Jul 10, 2010
Posts: 6
David Patrzeba wrote:Your call is:



however in the GameHelper class you define that function as:



Look at the "i's" i != I.
Thanks David for your detailed solution...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Almost right David. It was an l (lowercase L), not an I.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39828
    
  28
Please avoid coloured text and different text sizes; they make your posts annoying to read.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please help in rectifying error :Symbol not found