Ask Question
3 August, 13:53

Create a public non-final class named Streamer. You should implement one class method: filterStrings. It should accept a single parameter: a Stream of Strings (Stream). It should also return a Stream of Strings, but: only those that are longer than 8 characters and with each member of the stream converted to lowercase You may want to review yesterday's lecture and Java's official stream documentation, in particular the map and filter functions. You will need to import java. util. stream. Stream. Do not terminate the stream: simply return it from your function.

+1
Answers (1)
  1. 3 August, 15:29
    0
    See explaination

    Explanation:

    / Streamer. java

    import java. util. stream. Stream;

    public class Streamer {

    //required method

    public static Stream filterStrings (Stream stream) {

    //filtering out the strings from stream where length is less than or

    //equal to 8, and then converting all strings in the resultant stream

    //to lower case using map ()

    stream = stream. filter (e - > e. length () > 8). map (String::toLowerCase);

    return stream;

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Create a public non-final class named Streamer. You should implement one class method: filterStrings. It should accept a single parameter: ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers