Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Practice
Now that we know how to use Streams, let's try another exercise and get to know some more operators
- filter
- mapToInt → this will return an IntStream, which has some different operators from the default Stream
- sum
Now, starting again from a list of names, give me the total number of letters in all the names with more than 5 letters
1
8
9
10
11
12
13
// {
public static int getTotalNumberOfLettersOfNamesLongerThanFive(String... names) {
return 0;
}
//{
Enter to Rename, Shift+Enter to Preview
1
// {
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content