code: public static int getLength(Object array) {
          if (array instanceof Object[]) {
              return ((Object[]) array).length;
          } else if (array instanceof boolean[]) {
              return ((boolean[]) array).length;
          }
docs: Returns the length of the specified array object, as an {@code int}.
  
  @param array the array
  @return the length of the array
  @exception IllegalArgumentException if the object argument is not
  an array