title: Pushing accelerometer data into an array
body: <p>I'm having trouble recording the Z-axis data from the accelerometer in an array.</p>
  
  <p>I think I'm probably failing on some basic java rules, but here's what I'm trying to do:</p>
  
  <pre><code>    private ArrayList&lt;Float[]&gt; z = new ArrayList&lt;Float[]&gt;();
              protected void onCreate(Bundle savedInstanceState) {
  
                      SensorManager manager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
          Sensor accelerometer = manager
                  .getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  }
              public void onSensorChanged(SensorEvent event) {
  
  
                  float x = event.values[0];
                  float y = event.values[1];
                  z.add(event.values[2]);
  }
  </code></pre>
  
  <p>But whenever I try to add to the arraylist I get:</p>
  
  <blockquote>
    <p>"The method add(Float[]) in the type ArrayList is not applicable for the arguments (float)"</p>
  </blockquote>
  
  <p>How can I add the z axis data to an array?</p>