+ 2
can i keep arrays in parameters of method
3 Réponses
+ 18
Sure you can :) The following method takes an int array as parameter and prints all elements of it.
public static void printArray(int[] arr) {
for(int i=0; i<arr.length; i++){
System.out.println(arr[i]);
}
}
+ 7
You can use both multidimensional array and jagged array as your parameters. :)
0
. I. w,