The clear() method of DelayQueue in Java is used to remove all of the elements in the current DelayQueue object. The queue will be empty after this call is returned. The elements in the queue whose Delay does not have an Expiry are automatically discarded from the Queue.
public void clear()
Parameters: This method does not takes any parameter.
Return Value: This method does not returns any value.
Please Login to comment...