Say I make capacity of arrayBlockingQueue
and linkedBlockingQueue
both to 100. I add only 10 elements in each of them.
Will array
hold full capacity even though 90 elements are empty? I mean would it have 10 elements and 90 nulls?
Another thing, how would linked
behave in this case? Would it have 10 or 100 nodes? And would there be 90 'null value nodes'?
Can someone explain me this? How do they behave in this case?