code: public static int indexOf(String ele, String[] arr)
      {
          if ( arr == null ) {
              return -1;
          }
          
          for ( int i = 0; i < arr.length; i++ ) {
              if ( arr[i].equals(ele) ) {
                  return i;
              }
          }
          
          return -1;
      }
docs: check and search the specified element in the Array
  
  @param   ele
  @param   arr
  @return  int