deserialize array list code example
Example: how to deserialize an arraylist in java
public class Serialize implements Serializable{
FileOutputStream fos= new FileOutputStream("filePath.txt");
ObjectOutputStream oos= new ObjectOutputStream(fos);
oos.writeObject(arrayListToBeWritten);
oos.close();
fos.close();
ArrayList<T> list;
FileInputStream fis = new FileInputStream("filePath.txt");
ObjectInputStream ois = new ObjectInputStream(fis);
list = (ArrayList) ois.readObject();
ois.close();
fis.close();
for (T temp: list) {
System.out.println(temp);
}