code: public boolean setInStringArray(String[] strArray, int index, String str) {
          boolean result = false;
          if (strArray != null && index >= 0 && index < strArray.length) {
              strArray[index] = str;
              result = true;
          }
          return result;
      }
docs: Set the given string in the given array at the given index. This will
  overwrite the existing value at the given index.
  
  @param strArray The array to set in
  @param index The index of the element to overwrite
  @param str The string value to set
  
  @return <code>true</code> if the index was valid and the value was set,
  <code>false</code> otherwise