code: public static Object instantiateObject(Class<?> clazz) {
      try {
        Constructor<?> constructor = clazz.getConstructor();
        return constructor.newInstance();
      } catch (Exception exp) {
        throw new EntityManagerException(exp);
      }
  
    }
docs: Creates a new object of given class by invoking the class' default public constructor.
  
  @param clazz
  the class whose instance needs to be created
  @return a new instance of the given class
  @throws EntityManagerException
  if any error occurs