I have the following code:
try(ObjectOutputStream o=new ObjectOutputStream(new FileOutputStream(new File("users.dat")))){ o.writeObject(users);