This video is list of 17 ways you can create Streams in Java. From empty Streams to Streams from things like arrays, Collections, Strings, Files, Iterators, and Suppliers, I give code examples for each. That's 17 snippets that you can steal when you need to create a stream!
TIMESTAMPS
0:13 An Empty Stream
0:27 From a List of Values
0:38 From an Array
0:47 From Something that Might be Null
1:34 From Characters in a String
2:10 From a String with a Known Format (like CSV)
2:46 From the Lines of a Text File
3:25 From a Collection
3:40 From a Map
3:56 From a Computed Sequence
4:29 From an Iterator
5:14 From a Supplier
6:25 From a Range of Integers
6:51 Containing Random Numbers (uniform)
7:08 Containing Random Numbers (not uniform)
8:07 Using the Builder Pattern
8:37 From Two Existing Streams
ABOUT MY CHANNEL
My channel is about good software engineering practices. We cover introductions to programming in C and Java. But I also have lots of software and computer engineering topics like PIC programming, advanced programming techniques, and things that distinguish good code from code that works.
Check out my channel here:
/ @wizardcraftcode
Don’t forget to subscribe!
CHECK OUT MY OTHER VIDEOS:
C Programming Playlist: • Coding in C
Intro to Java Playlist: • Introduction to Java Programming based on ...
Software Engineering Topics Playlist: • General Software Engineering Topics