In the specification of PriorityBlockingQueue, it says:
While this queue is logically unbounded, attempted additions may fail due to resource exhaustion (causing OutOfMemoryError).
Are there any collection classes that permit storage of unbounded objects without getting resources exhaustion or OutOfMemoryError?
No, because the amount of matter available for computational purposes is finite (seriously).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With