private void testInfiniteStreams(){
  Random rand=new Random();
  Supplier<Integer> randomIntegerSupplier=null;
  Stream<Integer> randomIntStream=Stream.generate(randomIntegerSupplier);
  randomIntStream.forEach(null);
  Stream<Double> randomStream=Stream.generate(null);
  randomStream.forEach(null);
  Stream<Integer> wholeNumbers=Stream.iterate(1,null);
  wholeNumbers.forEach(null);
}

private void testInfiniteStreams ( ) { Random rand = new Random ( ) ; Supplier < Integer > randomIntegerSupplier = null ; Stream < Integer > randomIntStream = Stream . generate ( randomIntegerSupplier ) ; randomIntStream . forEach ( null ) ; Stream < Double > randomStream = Stream . generate ( null ) ; randomStream . forEach ( null ) ; Stream < Integer > wholeNumbers = Stream . iterate ( 1 , null ) ; wholeNumbers . forEach ( null ) ; }
creating infinite streams - a stream of continuous random numbers
