Java Java Maps Java Maps Java Maps Quiz

dingus blank
dingus blank
3,229 Points


import java.util.HashMap; import java.util.Map;

public class Main { public static void main(String[] args) { Map<String, int> studentGradeMap = new HashMap<>(); } }

class Student { // omitted }

class Grade { // omitted }

I was told add the "Map<>" Part, its showing as correct with the green checkmark, but it says its wrong when i click next question.

1 Answer

Brendan Whiting
Brendan Whiting
Front End Web Development Treehouse Moderator 83,031 Points

Yes, it's a bug that it's showing you a green rectangle even though it's wrong.

As for the question itself, it wants you to map Student to Grade, but you're mapping Student to int.