Ask coding questions

← Back to all posts
ArrayList and Array

I am trying to make an averager, but first of all 1.I am trying to get the size of the stuff array I made and .length and .size didn't work 2. It says error: cannot find symbol ArrayList<Float> list = new ArrayList<Float>(stuff.ToList()); ^
how can I fix this? 3. When I try to convert stuff = list.toArray(); but it says error: incompatible types: Object[] cannot be converted to float[] stuff = list.toArray(); ^
which I don't understand, should I made the array a non-primitive data type?

That is the problem and please help me.