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 trialJames Adamski
3,027 PointsHas anyone seen a test error - Map can't be converted to Map
JavaTester.java:122: error: incompatible types: Map> cannot be converted to Map vidz = qf.videosByTitle(course); ^ 1 error
The error I am getting seems to be coming from the test unit attached to our course. Has anyone seen this before?
2 Answers
James Adamski
3,027 PointsI got that error when I started the the following with Map instead of TreeMap on the right side of the equation. Can you post your code?
Map<String, List<Song>> byArtist = new TreeMap<>();
James Adamski
3,027 PointsThe problem seems to be that the test code is expecting a different implementation than the one you are providing.
AJ Longstreet
Treehouse Project ReviewerTry.
Map<String, List<Song>> byArtist = new TreeMap<String, List<Song>>();
Can you share the link to the challenge?
AJ Longstreet
Treehouse Project ReviewerAJ Longstreet
Treehouse Project ReviewerCan you share your code so we can get a bit more information on what is going on?