code: public static Class elementType(Class clazz) {
          checkArrayType(clazz);
  
          while (clazz.isArray()) {
              clazz = clazz.getComponentType();
          }
  
          return clazz;
      }
docs: Get the type of array elements
  
  @param clazz the type of array
  @return the type of elements