title: getting JSONArrays with Volley
body: <p>I am trying to get a JSONArray from a server but getting all kinds of errors. EDIT : tried adding all these imports.</p>
  
  <pre><code>    import android.support.v7.app.AppCompatActivity;
  import com.android.volley.Request;
  import com.android.volley.RequestQueue;
  import com.android.volley.Response;
  import com.android.volley.Response.Listener;
  import com.android.volley.NetworkResponse;
  import com.android.volley.ParseError;
  import com.android.volley.toolbox.JsonArrayRequest;
  import com.android.volley.toolbox.JsonObjectRequest;
  import com.android.volley.toolbox.Volley;
  import com.android.volley.Response.ErrorListener;
  
  
      public class VolleyFetcher extends AppCompatActivity
      {
          RequestQueue queue = Volley.newRequestQueue(this);
          String url = "https://xxxxxx.json"; 
  
          JsonObjectRequest jsObjRequest = new JsonObjectRequest(
                  Request.Method.GET, url, null, new Response.Listener&lt;JSONArray&gt;() {
                      @Override
                      public void onResponse(JSONArray response) {
                      // TODO Auto-generated method stub
                  }
                  }, new Response.ErrorListener() {
  
                  @Override
                  public void onErrorResponse(VolleyError error) 
                  {
                      // TODO Auto-generated method stub
                  }
                  });
  
          queue.add(jsObjRequest);    
      }
  </code></pre>
  
  <p>My errors: </p>
  
  <p><code>Response cannot be resolved to a type</code>        </p>
  
  <p><code>JSONArray cannot be resolved to a type</code></p>
  
  <p><code>Syntax error on token "jsObjRequest", VariableDeclaratorId expected after this token (//line : queue.add(jsObjRequest)</code></p>
  
  <p>Any advice would be very much appreciated.</p>