I have a simple question. I am implementing PriorityQueue
in my project. My question is can i set a fixed size for PriorityQueue
is Java ?
How to set fixed size to PriorityQueue in Java?
10.9k views Asked by medo0070 At
1
I have a simple question. I am implementing PriorityQueue
in my project. My question is can i set a fixed size for PriorityQueue
is Java ?
As the oracle documentation here states, http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html:
A possible workaround may be that you can check the size before performing any operation: