Array array = new Array();
array.add( "cat" );
array.add( "dog" );
array.add( "emu" );
System.out.println( "array = " + array );
ArrayIterator finish = array.end();
finish.retreat();
Swapping.iterSwap( array.begin(), finish );
System.out.println( "After swapping first and last elements = " + array );
Deque deque = new Deque();
deque.add( "pig" );
deque.add( "hog" );
System.out.println( "deque = " + deque + ", array = " + array );
Swapping.swapRanges( deque.begin(), deque.end(), array.begin() );
System.out.println( "deque = " + deque + ", array = " + array );