Methods with Arrays

Hello, I am having some trouble trying to figure out how to call a method with arrays instantiated such as:

public static int readProducts(String[] products, double[] prices, int[] quantities){

We have never done method calling that has arrays in it and don't know how to set up the main method.

Whatever I put within the parenthesis in the readProducts(), i get an error saying I cant use a primitive data type to refer to the method with arrays. Any comments would be helpful. Thank you.

[516 byte] By [untamed316a] at [2007-10-3 7:38:43]
# 1

You just pass in the arrays like normal variables:

String[] products = { "a", "b" };

double[] prices = { 20.0 , 30.0 };

double[] quantities = { 5, 10 };

readProducts(products, prices, quantities);

kindofbluea at 2007-7-15 2:39:16 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...