Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best collection to store student details?

Hey im making a store for student details and i wanted some opinions on which collection to use. The store will have details such as name, number, address and email. The store will then be printed to a text file where i can load, save, edit and delete the details in the text file. I have never done this before and i do not no if there is any restrictions to file I/O when using collections. So i would really appreciate the comments. Thanks in advance.

like image 741
Pendo826 Avatar asked Aug 02 '12 13:08

Pendo826


1 Answers

If I were at your place,

then i would have created a bean class say Student and for collection ArrayList<Student> student = new ArrayList<Student>(); and as ArrayList is serialized so no issue for disk writing and a class for all IO operations.

For sorting ArrayList by object property look

like image 168
Harmeet Singh Avatar answered Sep 18 '22 07:09

Harmeet Singh