Java ArrayBlockingQueue remove() MethodLast Updated : 17 Mar 2025 The remove() method of ArrayBlockingQueue class removes the specified element from the queue, if that element is present in the queue. Syntax:Parameters:The parameter 'o' is passed which is removed from the queue, if the element is present. Specified By:The remove () method of ArrayBlockingQueue class is specified by:
Return Value:The remove() method returns a Boolean value corresponding to this Object 'o':
Example 1Output: Elements in queue : [12, 98, 122, 102, 112] Remaining elements in queue : [12, 98, 112] Example 2Output: Cake Pulses Sugar Salt Basmati Rice Aata New List : [Pulses, Sugar, Basmati Rice, Aata] Next TopicJava-arrayblockingqueue-removeif-method |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India