Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Data Structures Efficiency! Implement Chooser UI

John Paige
John Paige
7,436 Points

KaraokeMachine.java- I could use some help!

I'm having quite a bit of trouble figuring out the issue... a typo or maybe a messed up scope? I'd appreciate any insight.

https://w.trhou.se/jso4gkjd13

Picked up JAVA_TOOL_OPTIONS: -Xmx128m                                                                                                                                     
Picked up _JAVA_OPTIONS: -Xmx128m                                                                                                                                         
./com/teamtreehouse/KaraokeMachine.java:55: error: cannot find symbol                                                                                                     
           Song artistSong = promptSongForArtist(artist);                                                                                                                 
                             ^                                                                                                                                            
  symbol:   method promptSongForArtist(String)                                                                                                                            
  location: class KaraokeMachine                                                                                                                                          
./com/teamtreehouse/KaraokeMachine.java:88: error: cannot find symbol                                                                                                     
      return artist.get(index);                                                                                                                                           
             ^                                                                                                                                                            
  symbol:   variable artist                                                                                                                                               
  location: class KaraokeMachine                                                                                                                                          
2 errors  

1 Answer

Hi John,

Symbol errors mean that your method is called something else or is invisible at that point in the code. Post your code and I'll have a look!

Steve.

Sorry - just saw your snapshot! I'm on it ...

You've not got a method called promptSongForArtist? Do you mean promptForArtist?

John Paige
John Paige
7,436 Points

Sorry I ended up figuring out what was wrong w my code earlier. One of the mistakes was what you pointed out- i had typed promptForArtist instead of promptSongForArtist. I had also corrected line 88 where it says return artist.get(index); i changed to return artists.get(index);.

Thanks for the response tho! I was stumped until i came across someone's screenshot and saw those two mistakes.

Glad you got it sorted. :+1: