arrays in methods

I'm trying to use an array in a method I wrote called "cardGetter" that takes the array "cards" and returns "number". the array "cards" contains ints and "number" is an int.

I thought it would look like this when the return value is gotten in the main:

number = cardGetter(number, cards[]);

But my compiler is telling me this is incorrect. does anyone know the correct way to do this?

[418 byte] By [Jakeda] at [2007-11-27 3:46:37]
# 1
sorry, I think I figured it out. It seems java does not need to be reminded that a variable is an array. If I am wrong, please tell me. I think it would just look like this:number = cardGetter(number, cards);
Jakeda at 2007-7-12 8:50:21 > top of Java-index,Java Essentials,New To Java...
# 2
I think you are correct.
petes1234a at 2007-7-12 8:50:21 > top of Java-index,Java Essentials,New To Java...