Coding problems

ive been at this for a little bit now and im stuck and i dont know what to do.
there is an error but idk where.

import processing.serial.*;
Serial myPort;
PImage logo;
int bgcolor=0;
void setup(){
 size(1,1);
 surface.setResizable(true);
  colorMode(HSB, 255);
  logo=loadImage("http://arduino.cc/arduino_logo.png");
  surface.setSize(logo.width, logo.height);
  println("Available serial ports:");
  println(Serial.list ());
  myPort=
   new Serial(this, Serial.list()[0], 9600);
}
void draw(){
  if(myPort.available()>0){
    bgcolor=myPort.read();
    println(bgcolor);
  }
  background(bgcolor,255,255);
image(logo, 0,0);
}

What error are you getting?

its saying to type sting[] but idk how to use it or where to use it

Can you please post the exact text of the error message? Also please format your code by highlighting it and pressing the code button in the forum editor.

Honestly this is just a warning and can be ignored.

But the error is trying to explain itself to you. The println() function has a form where it takes an Object... vararg. By giving it an array, you’re giving it something other than exactly what it’s expecting. It will still work though.

You can get rid of the warning by casting to Object[], like this:

println((Object[])Serial.list ());

But honestly I probably wouldn’t worry about this, especially because this line of code appears to be just for debugging anyway.