Adding into a file without Overwriting it
Hey everyone,
So, I'm working on a final project for my intro to Java course, and I've run into an issue. What my program does is, you (a teacher supposedly), enter a student's name either to create or modify the classes they're taking along with their CI (gpa) and other things.
Now the issue that I'm having is that. I made the program so that when you click the GUI to create a profile, it takes the first and last name, combines them, adds the extention .txt, and puts it in C:/. Now, once I create the file I want to just input the information the "teacher" puts in, instead of creating a new instance of the .txt document.
For example:
FileOutputStream x = new FileOutputStream(Name);
ObjectOutputStream b = new ObjectOutputStream(x);
b.writeObject(student);
where student is an object with fields such as one's grade and whatnot.
Can someone help? Thank you in advance!

