![]() |
VOOZH | about |
public int size()Returns: This method number of elements in this ConcurrentLinkedQueue. Below programs illustrate size() method of ConcurrentLinkedQueue: Example 1:
ConcurrentLinkedQueue: [4353, 7824, 78249, 8724] Size of ConcurrentLinkedQueue: 4
ConcurrentLinkedQueue: [Aman, Amar, Sanjeet, Rabi] Size of ConcurrentLinkedQueue: 4 After 2 removal of elements ConcurrentLinkedQueue: [Sanjeet, Rabi] Size of ConcurrentLinkedQueue: 2