void measureTime()
{
int i, j, len = 10, size = 1000000;
IntArrayList list;
IntDeque deque;
long st, et;
st = System.currentTimeMillis();
for (i=0; i<size; i++)
{
list = new IntArrayList();
for (j=0; j<len; j++)
list.add(j);
list.remove(list.size()-1);
}
et = System.currentTimeMillis();
System.out.println(et-st);
st = System.currentTimeMillis();
for (i=0; i<size; i++)
{
deque = new IntArrayDeque();
for (j=0; j<len; j++)
deque.addLast(j);
deque.removeLast();
}
et = System.currentTimeMillis();
System.out.println(et-st);
}