Browse Source

Neuer Aufrufparamenter

neuerZweig
lauraF 3 years ago
parent
commit
715d742afd
  1. 4
      ArrayManipulation.java

4
ArrayManipulation.java

@ -3,7 +3,7 @@ import java.util.Arrays;
public class ArrayManipulation {
public static int[] reverseArray(int[] arr) {
public static int[] reverseArray(int[] arr, String name) {
for (int i = 0; i < arr.length/2; i++) {
int tmp = arr[i];
@ -16,7 +16,7 @@ public class ArrayManipulation {
public static void main(String[] args) {
int[] arr = {1,2,3,4,5};
System.out.println(Arrays.toString(reverseArray(arr)));
System.out.println(Arrays.toString(reverseArray(arr, "Hannah")));
}
public static int[] removeFirst(int[] arr) {