I am using search of ConcurrentHashMap like this:
map.search(1, (k, v) -> {
return v.size() > 10 ? k : null;
});
But when I remove braces it gives me compilation error:
map.search(1, (k, v) ->
return v.size() > 10 ? return k : null;
);
I want to remove braces since it is single statement in lambda expression.
Update : corrected typo