How to get an element(at head) from ConcurrentLinkedQueue in java without removing the element
CodePudding user response:
You just call element()
, from the Queue
interface.
CodePudding user response:
You can use this:
ConcurrentLinkedQueueObject.peek()