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! While you're at it, check out some resources Treehouse students have shared here.
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 trialJohn Paige
7,436 PointsKaraokeMachine.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.
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
Steve Hunter
57,712 PointsHi 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.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsSorry - just saw your snapshot! I'm on it ...
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsYou've not got a method called
promptSongForArtist
? Do you meanpromptForArtist
?John Paige
7,436 PointsJohn Paige
7,436 PointsSorry 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 ofpromptSongForArtist
. I had also corrected line 88 where it saysreturn artist.get(index);
i changed toreturn artists.get(index);
.Thanks for the response tho! I was stumped until i came across someone's screenshot and saw those two mistakes.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsGlad you got it sorted.