This is not fine
List<List<? extends Number>> a;
List<List<Integer>> b;
a = b;
This is fine
List<? extends Number> c;
List<Integer> d;
c = d;
How can make it compile first one?
You could use this:
List<? extends List<? extends Number>> a;
List<List<Integer>> b;
a = b;
List<? extends List<? extends Number>> a = null;
List<List<Integer>> b = null;
a = b;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With