Task 4 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

9.1 Generic classes — write a generic Pair

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Write the generic class Pair<K, V> holding a key of type K and a value of type V, both set by the constructor.

Two independent type parameters: the program prints age and then 30.

Your solution