code: public void deleteAccount() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          Map<String, String> attributes = new HashMap<>();
          // To delete an account, we add a single attribute, "remove", that is blank.
          attributes.put("remove", "");
          Registration reg = new Registration(attributes);
          reg.setType(IQ.Type.set);
          reg.setTo(connection().getXMPPServiceDomain());
          createStanzaCollectorAndSend(reg).nextResultOrThrow();
      }
docs: Deletes the currently logged-in account from the server. This operation can only
  be performed after a successful login operation has been completed. Not all servers
  support deleting accounts; an XMPPException will be thrown when that is the case.
  
  @throws IllegalStateException if not currently logged-in to the server.
  @throws XMPPErrorException if an error occurs when deleting the account.
  @throws NoResponseException if there was no response from the server.
  @throws NotConnectedException
  @throws InterruptedException