I came across the grow() method for when a stack is full, but when I saw there was a difference in the grow() function in the arraydeque, I wondered what the difference actually was.
Does anyone know the answer to this?
if (s == elementData.length){
elementData = this.grow()
}
So eventually I found out that the differences are the following:
Stack growable:
Arraydeque growable:
'Array deques have no capacity restrictions and they grow as necessary to support usage.' arraydeque