I'm working on a program for school and I need to send an array into a method.

I have the following in Main:
String list = printLine(arrayList[ ]);

And the following is the start of the method:
public static String printLine(int[ ] a)

Why won't arrayList[ ] plug into the printLine() method?

Thanks.

Don't use array subscripts [ ] with argument.

String list = printLine(arrayList);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.