code: public Object get(int index) {
          Object o = opt(index);
          if (o == null) {
              throw new RuntimeException(new JSONException("JSONArray[" + index + "] not found."));
          }
          return o;
      }
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.