expressões lambda java code example
Example: lambda expression java
public class TestLambda {
public static void main(String args[]) {
List<String> lowerCaseStringsList = Arrays.asList("a","b","c");
// the :: notation is the lambda expression
// it's the same as the anonymous function s -> s.toUpperCase()
List<String> upperCaseStringsList = lowerCaseStringsList.stream().
map(String::toUpperCase).
collect(Collectors.toList());
}
}