1// A sample program for array traversal
2public class Main {
3 public static void main(String[] args) {
4 int[] intArr = {2, 3, 5, 7, 11, 13, 17, 19};
5 System.out.println("The array elements are ");
6 // Print all the array elementsfor (int i = 0; i < intArr.length; i++) {
7 System.out.print(intArr[i] + " ");
8 }
9 }
10}
11