title: JSON array get length
body: <p>I can't get the array length of the JSON array. when I using length(); method it is not working, it show as red underline in Netbeans </p>
  
  <p>this is the source code </p>
  
  <pre><code> try {
  
          JSONObject myjson = JSONObject.fromObject(practiceInfoByUsername);
  
          //JSONArray nameArray = myjson.names();
          final JSONArray jar = myjson.getJSONArray("_types");
          for(int i=0; i&lt;jar.length(); i++)
          {
              String p = jar.getString(i);
              Log.i("p",p);
  
  
          }
  
      } catch (JSONException e) {
              e.printStackTrace();
      }
  </code></pre>