public String toString(){
  StringBuilder buf=new StringBuilder();
  buf.append(this.coefficient);
  if (this.variables.length > 0) {
    buf.append("*");
  }
  for (  int variable : this.variables) {
    buf.append("(V");
    buf.append(variable);
    buf.append(")");
  }
  return buf.toString();
}

public String toString ( ) { StringBuilder buf = new StringBuilder ( ) ; buf . append ( this . coefficient ) ; if ( this . variables . length > 0 ) { buf . append ( "*" ) ; } for ( int variable : this . variables ) { buf . append ( "(V" ) ; buf . append ( variable ) ; buf . append ( ")" ) ; } return buf . toString ( ) ; }
prints out a representation of the term .
