CMLStack { void push(String item) { if (sp == stack.length) { String[] temp = new String[2 * sp]; System.arraycopy(stack, 0, temp, 0, sp); stack = temp; } stack[sp++] = item; }  @Override String toString();  }
@Test public void testPush_String() { CMLStack stack = new CMLStack(); for (int i = 0; i < 100; i++) { stack.push("element"); } }