code: public boolean isPingSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException  {
          return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, Ping.NAMESPACE);
      }
docs: Query the specified entity to see if it supports the Ping protocol (XEP-0199).
  
  @param jid The id of the entity the query is being sent to
  @return true if it supports ping, false otherwise.
  @throws XMPPErrorException An XMPP related error occurred during the request
  @throws NoResponseException if there was no response from the jid.
  @throws NotConnectedException
  @throws InterruptedException