public static LongStream concat(LongStream a,LongStream b){
  Objects.requireNonNull(a);
  Objects.requireNonNull(b);
  Spliterator.OfLong split=new Streams.ConcatSpliterator.OfLong(a.spliterator(),b.spliterator());
  LongStream stream=StreamSupport.longStream(split,a.isParallel() || b.isParallel());
  return stream.onClose(Streams.composedClose(a,b));
}

public static LongStream concat ( LongStream a , LongStream b ) { Objects . requireNonNull ( a ) ; Objects . requireNonNull ( b ) ; Spliterator . OfLong split = new Streams . ConcatSpliterator . OfLong ( a . spliterator ( ) , b . spliterator ( ) ) ; LongStream stream = StreamSupport . longStream ( split , a . isParallel ( ) || b . isParallel ( ) ) ; return stream . onClose ( Streams . composedClose ( a , b ) ) ; }
creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream . the resulting stream is ordered if both of the input streams are ordered , and parallel if either of the input streams is parallel . when the resulting stream is closed , the close handlers for both input streams are invoked .
