Home > Mobile >  How to get a element(at head) form ConcurrentLinkedQueue in java without removing the element
How to get a element(at head) form ConcurrentLinkedQueue in java without removing the element

Time:11-10

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()
  • Related