Wherever I try to define an array list in Processing (java) I get this syntax error:
Unexpected token: <
As of code:
ArrayList<byte> graph;
void setup() {
// List serial ports and chose the first one
println(Serial.list());
myPort = new Serial(this, Serial.list()[0], 9600);
//Initialise the byte array
graph = new ArrayList<byte>();
}
I'm new to java, byt this is the syntax I have found in official docs, so there must be some issue with Processing implementation.