I am new to generics and learning generics from hear https://docs.oracle.com/javase/tutorial/java/generics/bounded.html
I am learning about Multiple Bounds what I understood is you can specify class like follows
class D <T extends A & B & C> { /* ... */ }
D<A> d = new D<>();
only if A does implements B and C both other wise compile time error will ocur also B and C should be Interface other wise //interface is expeced compile time error will occurs
I am not talking about wildcards
My problem is I am not getting any real programing use of this. I am finding a way/example how can i use Multiple bound generics while codding.
When should I use it?
thanks