Suppose I have a situation like this:
map.compute(key, (k, v) -> {
// Only do stuff with v.
});
Since I only work with v
, I don't need the first parameter k
. Some languages allow _
which is—in my opinion—a neat way to visualize that there's a throw-away parameter.
Unfortunately, _
is a reserved keyword in Java (8). Are there any conventions or best practices how this is done with Java?