last array position code example
Example 1: last element of an array
int[] array = {1,2,3};
System.out.println(array[array.length - 1]);
Example 2: last 10 element of array
System.out.print(Primes1.get(Primes1.size() - 1) + " ");
int[] array = {1,2,3};
System.out.println(array[array.length - 1]);
System.out.print(Primes1.get(Primes1.size() - 1) + " ");