+ 2
Passing array as parameter of function in java
if i define a function , it's parameter is an array , how to call this function and passing the elements of it's parameter ( the array)
3 ответов
+ 13
Just an example code. Feel free to ask if you have any question :)
https://code.sololearn.com/cNLa8bLsDOUy/?ref=app
+ 7
Function(array);
+ 3
public class Program
{
public static int[] x(int[] y){
return y;
}
public static void main(String[] args) {
int[] m = new int[2];
m = x(m);
}
}
Not that great of an example but...