1import java.util.Arrays;
2import java.util.Iterator;
3
4public class ArrayToIterable {
5 public static void main(String args[]){
6 Integer[] myArray = {897, 56, 78, 90, 12, 123, 75};
7 Iterator<Integer> iterator = Arrays.stream(myArray).iterator();
8 while(iterator.hasNext()) {
9 System.out.println(iterator.next());
10 }
11 }
12}