Try / Catch in Constructor - Recommended Practice?
问题 Something I've always been curious of public class FileDataValidator { private String[] lineData; public FileDataValidator(String[] lineData){ this.lineData = lineData; removeLeadingAndTrailingQuotes(); try { validateName(); validateAge(); validateTown(); } catch(InvalidFormatException e) { e.printStackTrace(); } } //validation methods below all throwing InvalidFormatException Is is not advisable to include the try/catch block within my Constructor? I know I could have the Constructor throw