Generating a range of ints as strings in Java 8
Can you use a stream rather than an array in the rest of your application? If so I'd simply cut off the toArray bit at the end. Otherwise this looks exactly like what I'd expect in Java 8.