@Test public void pop() throws Exception { IntStack stack = new IntStack(4); stack.push(1); stack.push(2); stack.push(3); assertThat(stack.pop(), is(3)); assertThat(stack.pop(), is(2)); assertThat(stack.pop(), is(1)); }
int pop() { return xs[--n]; }
IntStack { int pop() { return xs[--n]; } }
IntStack { int pop() { return xs[--n]; } IntStack(final int n); }
IntStack { int pop() { return xs[--n]; } IntStack(final int n); int size(); void clear(); }
IntStack { int pop() { return xs[--n]; } IntStack(final int n); int size(); void clear();  }