Package modernfeatures.streams
Class StreamBasicsExampleV5
java.lang.Object
modernfeatures.streams.StreamBasicsExampleV5
Demonstrates the basics of Java Streams, including usage of Predicate, Function, and Consumer
for filter, map, and forEach operations, respectively.
This example creates a pipeline to process a list of names, filtering for names longer than 3 characters, converting them to uppercase, and printing each result.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StreamBasicsExampleV5
public StreamBasicsExampleV5()
-
-
Method Details
-
main
Entry point for the demonstration of stream operations using Predicate, Function, and Consumer. The method shows how to create a stream pipeline to process a list of names step by step.- Parameters:
args
- command-line arguments (not used)
-