Java LinkedTransferQueue contains() MethodThe contains() method of LinkedTransferQueue class returns a Boolean value true if the specified element is present in this queue. Syntax:Parameters:o - It is the object that is to be checked for the presence in this queue. Specified By:The contains() method of LinkedTransferQueue class is specified by:
Override:The contains() method of class LinkedTransferQueue is overridden by:
Return Value:The contains() method returns the Boolean value true if the specified element is present in this queue else it returns false. Example 1Test it NowOutput: 1.Jack 2.Harry 3.Kristan 4.John John is present Example 2Test it NowOutput: Your answer is correct. Example 3Test it NowOutput: Marry is present on 31.08.18
Next TopicJava LinkedTransferQueue
|