Creating an array of "PrintWriter" in processing?

3187 views processing

I want to create an array of the element "PrintWriter" (s) type but it tells me there is an error ! i'm new to java i don't understand why ? i think the way to declare an array is : type variable name[] = new type[size] this is the code:

PrintWriter output = new PrintWriter[10];

can some one help ?

answered question

1 Answer


Try adding [] to the type on the left:

PrintWriter[] output = new PrintWriter[10];

posted this

Have an answer?


Please login first before posting an answer.