Browse Source

Merge branch 'master' of gogs.informatik.hs-fulda.de:SlateDave/ha-01

master
David van der Sluijs 3 years ago
parent
commit
68c116bb3d
  1. 12
      ArrayManipulation.java

12
ArrayManipulation.java

@ -14,6 +14,18 @@ public class ArrayManipulation {
return arr;
}
public static int[] removeFirst(int[] arr) {
int[] newArray1 = new int[arr.length -1];
for (int i = 1; i < newArray1.length + 1; i++) {
newArray[i - 1] = arr[i];
}
return arr;
}
public static int[] removeLast(int[] arr) {
int[] newArray = new int[arr.length - 1];

Loading…
Cancel
Save