X1144: Make Map From Set

The method below takes in a set of String names of students. Below, use this set names to create a map (either HashMap or TreeMap is fine). Each key should be a one of the names in names, and each value should be the length of that name.

For example, if one of the names was "Katie", the method should make a key/value pair of {"Katie": 5}

Then, return that new map.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.