How to create a sub-array from another array? Is there a method that takes the indexes from the first array such as:
methodName(object array, int start, int
Use copyOfRange method from java.util.Arrays class:
int[] newArray = Arrays.copyOfRange(oldArray, startIndex, endIndex);
For more details:
Link to similar question