public ArrayList<User> initialAdminList() { ArrayList<User> adminList = new ArrayList<User>(); try { br = new BufferedReader(new FileReader("data/admin.txt")); while ((line = br.readLine()) != null) { String[] split = line.split(" "); Admin newAdmin = new Admin(); newAdmin.setId(split[0]); newAdmin.setName(null); newAdmin.setPassword(split[1]); newAdmin.setType("admin"); adminList.add(newAdmin); } } catch (IOException ex) { ex.printStackTrace(); } return adminList; }