Closed lgrignon closed 5 years ago
This code should return the removed object, returns an array instead
void setup() { ArrayList<Instruction> nums = new ArrayList<Instruction>(); nums.add(new Instruction(1,2)); Instruction x = nums.remove(0); println(x); // "Object" println(x.from); // undefined println(x.to); } class Instruction { int from, to; Instruction(int f, int t) { from = f; to = t; } }
This code should return the removed object, returns an array instead