hi
can u please tell me how to pass the array elements into a function in Java
Just pass the array to the function:
[code=java]
T[] yourArray= new T[42]; // this is your array
...
foo(yourArray); // pass it to function foo
...
void foo(T[] anArray) {
// your array is known by the name anArray here
}
[/code]
Comment