public class MainClass{ public static void main(String[] arg){ int[] primes = {2, 3, 5, 7, 11, 13, 17}; // An array of 7 elements for (int i = 0; i < primes.length; i++) { System.out.println(primes[i]); } } }
2 3 5 7 11 13 17