[Solved] Java Array Parameter and Array Type Metot [closed]


If I understand your question, your method signature

public static int carpma[] (int [] dizi)

should be

public static int[] carpma (int[] dizi)

which is a method that takes an int[] and returns an int[]. You could also use varargs like

public static int[] carpma (int... dizi) // <-- dizi is still accessed like an
                                         //     int[]

and then you can pass in an int[] or multiple individual int values.

int[] arr = carpma(1,2,3);

solved Java Array Parameter and Array Type Metot [closed]