question: public String toString ( ) { StringBuilder sb = new StringBuilder ( ) ; DoubleNode < IMove > node = moves . first ( ) ; boolean endsWithComma = false ; while ( node != null ) { sb . append ( node . value ( ) + "," ) ; node = node . next ( ) ; endsWithComma = true ; } if ( endsWithComma ) { sb . deleteCharAt ( sb . length ( ) - 1 ) ; } return sb . toString ( ) ; }
target:  Return solution as a string. 