code: public Object get(int index) throws JSONException {
          Object object = this.opt(index);
          if (object == null) {
              throw new JSONException("JSONArray[" + index + "] not found.");
          }
          return object;
      }
docs: Get the object value associated with an index.
  
  @param index
  The index must be between 0 and length() - 1.
  @return An object value.
  @throws JSONException
  If there is no value for the index.