DList dlist = new DList();
dlist.add( "apple" );
dlist.add( "banana" );
dlist.add( "lotus" );
dlist.add( "ferrari" );
dlist.add( "lamborghini" );
System.out.println( "dlist = " + dlist );
try
{
dlist.splice( dlist.begin(), dlist, dlist.begin(), dlist.end() );
}
catch ( InvalidOperationException ioe )
{
System.out.println( "Caught: " + ioe );
}