code: static public int indexOf(String[] strings, String targetString) {
          if (strings == null)
              return -1;
          for (int i = 0; i < strings.length; i++) {
              if (strings[i] == null) {
                  if (targetString == null) {
                      return i;
                  }
              } else {
                  if (targetString != null) {
                      if (strings[i].equals(targetString)) {
                          return i;
                      }
                  }
              }
          }
          return -1;
      }
docs: Finds the first occurrence of the targetString in the array of strings.
  Returns -1 if an occurrence wasn't found. This
  method will return true if a "null" is contained in the array and the
  targetString is also null.
  @param strings The array of strings to search.
  @param targetString The string to search for
  @return The index of the first occurrence, or -1 if not found. If strings
  array is null, will return -1;