Java: is there an easy way to select a subset of an array?

Use copyOfRange, available since Java 1.6:

Arrays.copyOfRange(array, 1, array.length);

Alternatives include:

Leave a Comment