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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With