Back
Close

Java Guild Meeting 5/2018

Gi11i4m
3,108 views

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
// {...}
public static int getTotalNumberOfLettersOfNamesLongerThanFive(String... names) {
return 0;
}
//{...}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants