public String close_account(String accountNum) { // actually closes the customer's account and returns a dialog box customer.removeAccount(accountNum); String cusInfo = customer.returnInfo(); StringBuilder result = new StringBuilder(); result.append("<html>Deleted account!<br>Updated information:<br>"); String subCusInfo = cusInfo.substring(7, cusInfo.length()); // removes the last html tag from returnInfo() result.append(subCusInfo); try { saveFile(cust, DBfile); } catch (IOException e) { e.printStackTrace(); } customer = null; // resets the customer and account after each transaction pin = null; return result.toString(); }