public class CreateNewUser {
public String fullName;
public int age;
public String school;
public String username;
public String password;
File file = new File("users.txt");
public void setFullName(String n) {
    this.fullName = n;
}
public void setAge(int a) {
    this.age = a;
}
public void setUsername(String u) {
    this.username = u;
}   
public void setPassword(String p) {
    this.password = p;
}
public String getFullName() {
    return fullName;
}
public String getSchool() {
    return school;
}
public int getAge() {
    return age;
}
public String getUsername() {
    return username;
}
public String getPassword() {
    return password;
}
//write all info on to .txt 
public void writeToInfoFile(String u, String p, String s, int a) {
}
//write username & password to a sepereate file (users.txt)
public void writeToUsersFile(String u, String p) {
    try{
    PrintWriter output = new PrintWriter(file);
    //if username exists throw exception
    output.println(username + " " + password);
    output.close();
    } catch (IOException ex){
        System.out.println("ERROR: file not found.");
    }
}
}
public class CreateNewUserTest {
public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    CreateNewUser raul = new CreateNewUser();
    CreateNewUser jake = new CreateNewUser();
    String username, password;
    String uni;
    int age;
    //Raul
    System.out.printf("\tHello! Welcome to Ponder\t");
    System.out.println();
    System.out.print("Enter desired username: ");
    username = in.nextLine();
    raul.setUsername(username);
    System.out.println();
    System.out.print("Enter desired password: ");
    password = in.nextLine();
    raul.setPassword(password);
    raul.writeToUsersFile(username, password);
    in.close(); //close scanner
}
}
everytime I add a new username and passoword it replace the existing username and password. I want it to add the new username and password on a new line.
 
     
    