I have created an arraylist that is made up of custom objects. Basically the user will create a class and every time a class is created, a new Lecture (my custom object) is added to the arraylist. I need to save the generated arraylist so the user's classes will be saved even when the app is restarted.
From my understanding, I have to make my class serializable. But how exactly do I do that? And then once its serialized what do I do?
public class Lecture{
public String title;
public String startTime;
public String endTime;
public String day;
public boolean classEnabled;
public Lecture(String title, String startTime, String endTime, String day, boolean enable){
this.title = title;
this.startTime = startTime;
this.endTime = endTime;
this.day = day;
this.classEnabled = enable;
}
//Getters and setters below