public static byte[] removeTheElement(byte[] arr, int index) {
if (arr == null || index < 0 || index >= arr.length) {
return arr;
}
byte[] anotherArray = new byte[arr.length - 1];
for (int i = 0, k = 0; i < arr.length; i++) {
if (i == index) {
continue;
}
anotherArray[k++] = arr[i];
}
return anotherArray;
}
08-04
4万+
09-06
2593