keep the last few elements of an array code example Example: last 10 element of array System.out.print(Primes1.get(Primes1.size() - 1) + " ");