Ask coding questions

← Back to all posts
ArrayList and Array
Bunnytoes

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 Main.java:20: 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 Main.java:24: 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.

Voters
MikeW3
Bunnytoes