+ 2
how can i pass arrays as arguments to function
i try to access length of an array and m making a function for the same. now i want to pass array to the function. how to do this?
2 ответов
+ 2
i m asking about c++ not java bro.
0
class A
{
static void B(int[] arr)
{
System.out.println(arr.length);
}
public static void main (String [] args)
{
int array[] =new int[3] ;
B(array) ;
}
}