m.out.println("------------------------------- "); System.out.println(" 按回车键返回主菜单! "); tools.input(); } // 保存日志 public void saveRecord(Hashtable hashtable, String index, String account, String amount, Account account1, String str) { String nowtime = tools.getTime(); Record record = new Record(index, account, str, amount, account1.password1, account1.password1, nowtime); hashtable.put(index, record); records.setHashRecords(hashtable); io.output1(records); } 其余方法的实现基本一致 b) 输入输出类 IOProcess 包括读文件、写文件的操作。提示: public Accounts input() { ObjectInputStream object_in = null; try { File file = new File("zhanghu.dat"); if (!file.exists()){ file.createNewFile(); return accounts; } if (file.length() == 0) return accounts; FileInputStream f= new FileInputStream(file); object_in = new ObjectInputStream(f);