code: public static <T> T[] sub(T[] arr, int from, int to) {
  		int start = from >= 0 ? from : arr.length + from;
  		int end = to >= 0 ? to : arr.length + to;
  		return Arrays.copyOfRange(arr, start, end);
  	}
docs: /* sub