code: public String getString( int index ) {
        Object o = get( index );
        if( o != null ){
           return o.toString();
        }
        throw new JSONException( "JSONArray[" + index + "] not found." );
     }
docs: Get the string associated with an index.
  
  @param index The index must be between 0 and size() - 1.
  @return A string value.
  @throws JSONException If there is no value for the index.