When the documentation says "the queue size is infinite", it doesn't mean that infinite memory has been allocated for the queue, nor that you somehow could add an infinite number of elements to it. This is of course not possible, as there are always finite memory constraints.
When you provide 0 to the constructor, the Queue implementation does not itself pose any limit on how many items you could add to the queue. It will dynamically allocate more memory as needed while items are being added to it. It will never "block" an insertion, as it would do in the case of a non-zero limit. The only constraint is available memory.
Can we insert elements in the Queue if maxsize = 0 ?
what Does this means:- 'A max size of zero ‘0’ means an infinite queue'?
If we will put maxsize= 0 how can it have  infinite queue??
If we put maxsize = 0 in Queue . What happens then and can we insert elements after this?