I have serialized an ArrayList and stored it to a file with extension .ser . How can I deserialize the object and store it back into an ArrayList. I am getting an error Note: Hw5b.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
//Serializing Object
ArrayList<String[]> list = new ArrayList<String []>();
FileOutputStream fout = new FileOutputStream("movie-matrix2.ser");
ObjectOutputStream oos = new ObjectOutputStream(fout);
oos.writeObject(list);
//Deserializing Object
FileInputStream streamIn = new FileInputStream("movie-matrix2.ser");
ObjectInputStream objectInputStream = new ObjectInputStream(streamIn);
list = (ArrayList<String[]>)objectInputStream.readObject();