How can I create a data Model class ? , The data will be stored in an ArrayList. The array will store 4 pieces of data [ID,NAME,AGE,Gender]. the data will be sent to this class from JTextField.
I’m also willing to use vector instead of ArrayList.
I’ve tried looking for example but I can’t seem to find any that I can use for reference.
Thank you.
Use a custom Class and implements
Comparableinterface write your sorting logic. Insert all data to List. sort it byCollections.sort(list);