SSD2015/Stack

Type 1 : Incorrectly return value of capacity

Closed this issue · 0 comments

mxyz commented

we make stack with any size of capacity but method capacity() is always return -1

code :
final int capacity = 2;
Stack stack = StackFactory.makeStack(capacity);
assertEquals(capacity, stack.capacity()); // stack.capacity(); always return -1