I have a global ArrayList list declared with the intention of adding a float variable to it in a method:
ArrayList<Float[]> list = new ArrayList<Float[]>();
Here is the method:
public void recieve(float[] coords)
{
this.list.add(?);
}
What is the syntax for adding coords to the ArrayList?
coordsparameter will need to be converted to aFloat[](meaning an array of the object wrapper for a primitivefloat) before adding it to theArrayList, since theArrayListis expecting objects of typeFloat[], notfloat[]. Other than that, you have it correct.floatvariable, then pass in an arrayfloat[].