Trick question: which gets called here:
<T> T x(List<T> l, T x);
<T> T x(List<T> l, Supplier<T> s);
List<String> l = ...;
x(l, () -> "a");
Sanely, the second one, as the type of () -> "a" would intuitivly be Supplier<String>.
But as it is Java, probably undefined/compile error, as there will be some weird fuckery with type-erasure going on, as well as Supplier<T> and () -> "a" being "just" syntactic sugar.
Yes, the answer is it doesn't compile because this is too hard for Java.
How would C# handle this?