I have a linked blocking queue in which I am performing insertion and removal operations.
I need to know which one is better
Actually, you can't compare performance between these two, the
offer method is to just offer to the queue and it does not wait or waits for the time specified, but the
put method waits infinitely long until space is available, so their usage is different.
put where you cannot afford to loose an item, keeping in mind it will hold up your call stack, otherwise use