subsets of an array in java code example Example: java subset of array Arrays.copyOfRange(array, 1, array.length);