stefan balling wrote: . . . an ArrayQueue. It should act as a stack basically . . .
In which case, why are you calling it ArrayQueue? Stacks are Stacks and Queues are Queues and the two behave differently.
There are all sorts of other style problems, for example using an if-else to return a boolean. Look
here for what you ought to write.