public boolean hasErrors(){
  if (errors.size() > 0) {
    return true;
  }
 else {
    return false;
  }
}

public boolean hasErrors ( ) { if ( errors . size ( ) > 0 ) { return true ; } else { return false ; } }
checks if there are any errors generated during the comparison
