From ece736127cf59fa351965dd72761caa33903eafa Mon Sep 17 00:00:00 2001 From: Lena Date: Thu, 21 Apr 2022 18:00:47 +0200 Subject: [PATCH] Kommentare verbessert --- HA1/ArrayManipulation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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