8
Task
Java Collections,  level 5lesson 6
Locked
Several superclasses for generics
You're given a Solution class with a T type parameter. Place bounds on the T type parameter. T must simultaneously inherit the ClassForGenerics class and implement InterfaceForGenerics interface. You can only change the Solution class.
8
Task
Java Collections,  level 5lesson 6
Locked
Simple generics
Parameterize the Solution class so that it can work with all classes that inherit HashMap. The getMap method must return an object of the map field's type.
16
Task
Java Collections,  level 5lesson 6
Locked
Collections & Generics
Implement helper methods in the Solution class that create an appropriate collection and add the passed objects to it. The newArrayList and newHashSet methods have the T type parameter. The newHashMap method has K (key) and V (value) type parameters.