Multiple choice

Which of the following methods is/are present in the PriorityQueue class in Java?

  1. poll()

  2. offer(E e)

  3. contains(object : o)

  4. Both (1) and (2)

  5. All of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

As explained, all the methods are present in the PriorityQueue class. So, this answer is correct.