public void printDashedLine(){
  startNewLineIfNeeded();
  for (int i=0; i < lineLength; i++) {
    stream.print('-');
  }
  stream.println();
}

public void printDashedLine ( ) { startNewLineIfNeeded ( ) ; for ( int i = 0 ; i < lineLength ; i ++ ) { stream . print ( '-' ) ; } stream . println ( ) ; }
prints a dashed line .
