I have to use the ObjectOutputStream method while using SceneBuilder in Java.
String FILENAME = "au_studentlist.txt";
FileOutputStream outfile = new FileOutputStream(FILENAME, true);
ObjectOutputStream outstream = new ObjectOutputStream(outfile);
outstream.write("\n StudentID: " + txtStudentID.getText() + "\n First Name: " + txtFName.getText())
I am getting an error for the txt.getText() lines of code. The error is saying I cannot make a static reference to a non static text field.
I do not know what that means.
I don't even know if my ObjectOutputStream code is correct.