1. The purpose of this post
This post would demo how to use java 8 streams to do generate range values with java.
3. The demo
3.1 The old way
3.2 Use java 8 IntStream
You can get more information by view the java 8 IntStream API document.