package streams;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

public class Beispiele2 {
	
	public static void main(String[] args) {
		
		Integer[] myArray = new Integer[]{10,20,22,30,50};
		Stream<Integer>  myStream = Arrays.stream(myArray);
		// entweder
		myStream.sorted().forEach(System.out::println);;
		
		//oder
		myStream.forEach(i -> System.out.println(i));
		
		


	}
}
