Java ArrayBlockingQueue contains() MethodThe contains() method of Java ArrayBlockingQueue() class returns true if the defined element is present in this queue. Syntax:Parameters:o - This is the object that is to be checked for occurrence in this queue. Specified By:The contains() method of ArrayBlockingQueue class is specified by:
Override:The contains() method of class ArrayBlockinQueue is overrided by contains() method in class AbstractCollection. Return ValueThe contains() method returns true if the defined element is present in this queue. Example 1Output: Reema Rahul Rita Ramesh queue.contains( reema) will return true Example 2Output: Student : Reema Reema is present. Next TopicJava-arrayblockingqueue-foreach-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India