|
|
|
|
|
by charcircuit
1145 days ago
|
|
>most of the OOP programmers I know do not understand covariance and contravariance (whereas just about every functional programmer I know has mastered them) I very much doubt this and I suspect it is more of a problem of how you framed it. I'm sure you would see more success if you framed it seeing if the following would compile. List list = new ArrayList<String>;
and for contravariance ,which is something that is not very common in practice Consumer printHashCode = o -> System.out.println(o.hashCode());
Consumer<String> printStringHashCode = printHashCode;
|
|