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 trialCourtney Mahida
2,367 Pointsincompatible types and cannot find symbol error
I can't figure out what the issue...???
Error:(72, 79) java: incompatible types: com.teamtreehouse.model.Song cannot be converted to java.lang.String Error:(154, 25) java: cannot find symbol symbol: method getVideoUrl() location: variable song of type java.lang.String Error:(155, 25) java: cannot find symbol symbol: method getTitle() location: variable song of type java.lang.String Error:(156, 25) java: cannot find symbol symbol: method getArtist() location: variable song of type java.lang.String
Error 1: case "choose": String singerName = promptForSingerName(); String artist = promptArtist(); Song artistSong = promptSongForArtist(artist); SongRequest songRequest = new SongRequest(singerName, artistSong); if (mSongQueue.contains(songRequest)) { System.out.printf("%n%n Whoops %s already requested %s!", singerName, artistSong); break; }
Errors 2, 3, 4: public void playNext() { SongRequest songRequest = mSongQueue.poll(); if (songRequest == null) { System.out.println("Sorry there are no songs in the queue. Use choose " + "from the menu to add more songs."); } else { String song = songRequest.getSong(); System.out.printf("%n%n%n Ready %s? Open %s to hear %s by %s %n%n%n", songRequest.getSingerName(), song.getVideoUrl(), song.getTitle(), song.getArtist()); } }
Grigorij Schleifer
10,365 PointsGrigorij Schleifer
10,365 PointsHi Courtney,
can you add your code?