Java Deque removeLastOccurrence() MethodThe removeLastOccurrence() method of Deque interface is used to remove the last occurrence of the specified element from the given deque. If there is no element in the deque, then it remains unchanged. The above method returns true if the specified element is present in the deque. Syntax:Parameter:The above requires only one parameter:
Return:The above method is used to return true if the specified element is removed. Throw:
Example 1Test it NowOutput: The value is already present in the deque : true The final deque is given as : a b c d Example 2Test it NowOutput: The value is already present in the deque : false The final deque is given as : 23 45 63 45 Example 3Test it NowOutput: The value is already present in the deque : true The final deque is given as : 55.8 22.3 89.0 Next TopicJava Deque |
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