• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

please help in rectifying error :Symbol not found

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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??
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:

 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ankeet Maini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ankeet Maini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your call is:



however in the GameHelper class you define that function as:



Look at the "i's" i != I.
 
Ankeet Maini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all!!
 
Ankeet Maini
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Almost right David. It was an l (lowercase L), not an I.
 
Marshal
Posts: 79254
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please avoid coloured text and different text sizes; they make your posts annoying to read.
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic