Code refuses to compile when using comparator with lambda

Mrityunjay Sharma mrityunjay2002 at
Tue Mar 19 11:23:08 PDT 2013

Hi All,
The below code refuses to compile when using comparator.

but when i provide the type implementation (as below) of above lambda
expression, it works properly.

* new ToIntFunction<Shape>() {*
* public int applyAsInt(Shape s) {*
* return s.getSize();*
* }}*
* ));*

Please let me know if i am missing something.


More information about the lambda-dev mailing list