Hi,

I think I need to use serializable in-order to read objects in this case "engine" from a file. Although, I don't have any idea how to read the onject. This is what I have done thus far:

java Code:
  1. public void readFromTextFile(BufferedReader fi) throws IOException {
  2.         this.engine =Integer.parseInt(fi.readLine());
  3.     }
  4.  
  5.     public void writeToTextFile(PrintWriter fo) throws IOException {
  6.           fo.println(this.engine);
  7.     }

I have been trying to follow this example but I'm unsure whether I need everything in the example?

Thanks,


Nightwalker83