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.
Several superclasses for generics
- 8
Locked
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Justin Smith
22 November 2022, 12:17
They haven't shown you how to parameterize an interface with generics yet, so I'm not sure why this is considered easy. It isn't intuitive and doesn't work the same way as writing a class that implements an interface. I had to look at the solution.
0
JianQiu Hwang
12 April 2020, 10:16
Generics Multiple Bounds in Java Tutorial
+2
Baurzhan Konurbayev
29 August 2020, 03:56
Thanks!
0