I am making an attempt to prompt the user to create the name for the writing and reading serialized file. E.g. could I do the following:
System.out.print("What would you like to name your file?");
String fileName = scanner.nextLine;
try{
ObjectOutput ostream = new ObjectOutputStream(new FileOutputStream(fileName)) // Would this create a file with the name inputted by the user? If so what would be the extension for the file?
ostream.writeObject(//whatever I want to put in here)
//close
//catch
try{
ObjectInputStream = new ObjectInputStream(new FileInputStream(fileName))
//catch