diff --git a/HA1/ArrayManipulation.java b/HA1/ArrayManipulation.java index cb95d7b..7bd8f7e 100644 --- a/HA1/ArrayManipulation.java +++ b/HA1/ArrayManipulation.java @@ -16,12 +16,12 @@ public class ArrayManipulation { public static int[] removeLast(int[] arr){ int arr2[]; - if(arr.length<=1) return arr2 = new int[0]; //Falls Array nur eine oder weniger Elemente hat,leeres Array zurückgeben - arr2 = new int[arr.length-1]; //Sonst neues Array mit einem Element weniger erstellen + if(arr.length<=1) return arr2 = new int[0]; //if array only has 1 elements, give empty array + arr2 = new int[arr.length-1]; //else make new array with length one less for(int i=0; i