code: public boolean queueExists(String queueName, String queueOwnerAccountId) throws JMSException {
          try {
              GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest(queueName);
              getQueueUrlRequest.setQueueOwnerAWSAccountId(queueOwnerAccountId);
              prepareRequest(getQueueUrlRequest);
              amazonSQSClient.getQueueUrl(getQueueUrlRequest);
              return true;
          } catch (QueueDoesNotExistException e) {
              return false;
          } catch (AmazonClientException e) {
              throw handleException(e, "getQueueUrl");
          }
      }
docs: Check if the requested queue exists. This function calls
  <code>GetQueueUrl</code> for the given queue name with the given owner
  accountId, returning true on success, false if it gets
  <code>QueueDoesNotExistException</code>.
  
  @param queueName
  the queue to check
  @param queueOwnerAccountId
  The AWS accountId of the account that created the queue
  @return true if the queue exists, false if it doesn't.
  @throws JMSException