I am a self-learner. Currently, I am making a GUI project in which I need a matrice-type database.
I would like to learn how I can create a class that can store multiple objects in an arraylist.
Here is my sample code. Please note that this is just my attempt. This code is not finalized, and it's not working.
Thank you for your kind help.
import java.util.ArrayList;
import java.util.List;
}}
I think a better way to do this is to create a user info class to store the information of a particular user like this.
And you put it into an ArrayList.
Then for your current methods, you can do