What is the purpose of the `Stream.filter()` method in Java?
The `Stream.filter()` method transforms the elements of the stream based on the given predicate.
That's incorrect. The `filter()` method doesn't transform elements; it only selects them based on a condition.
Would you like me to explain how `map()` is used to transform elements of a stream?