3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by adil_bashir
0

please give some piece of code that will make me understand that how to pass an array to a method/function?

well lets say we want to parse an int[]:

private static method(int[] arr) {//static was used if necessarry
}

you'd then call it using:

int[] array=new int[5];
method(array);

Edited by DavidKroukamp: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.