code: public static <T> Queue<T> newConcurrentQueue(int maxSize) {
  
          if (maxSize == Integer.MAX_VALUE) {
              return new ConcurrentLinkedDeque<>();
          }
  
          return maxSize > ARRAY_QUEUE_THRESHOLD ? new LinkedBlockingQueue<>(maxSize) : new ArrayBlockingQueue<>(maxSize);
      }
docs: Creates a new, optionally bounded, {@link Queue} that does not require external synchronization.
  
  @param maxSize queue size. If {@link Integer#MAX_VALUE}, then creates an {@link ConcurrentLinkedDeque unbounded queue}.
  @return a new, empty {@link Queue}.