public DynamicIntStack(int initialSize) { stack = new int[initialSize]; position = 0; size = initialSize; }