Java : Generics, wildcards with multiple bounds

90 Views Asked by At

First of all, happy new year to everyone ! I would like to write a method with a multiple bounds parameter like that:

public static void max(List<? extends Number & Comparable<?>> list)

But unfortunately this code does not compile, could someone explain to me why writing a wilcard parameter with multiple bounds is not possible ?

Thanks

0

There are 0 best solutions below