r/learnSQL • • 19d ago

Title: Day 65-67 — Combined update: revised all my Java so far and started the Collections framework (ArrayList)

After building two OOP projects, I used these three days to revise everything I’ve covered in Java, then moved on to a new topic: the Collections framework, starting with ArrayList.

Tomorrow I’m covering LinkedList, HashMap, and HashSet. For each one I plan to write a small exercise based on a real-life situation (for example, a contact book for HashMap, or removing duplicate entries with HashSet), because I learned from SQL that I remember a topic much better when I use it on something concrete.

For people who’ve learned collections: which real-life exercises helped you understand when to pick one collection over another? I’m especially unsure about LinkedList, since ArrayList seems to cover most cases.

5 Upvotes

3 comments sorted by

1

u/Green_Chamomile 18d ago

Love that you’re doing a real-life exercise for each one, the contact book is perfect for HashMap. And yeah you’re right about LinkedList, ArrayList wins most of the time. LinkedList only really makes sense when you keep adding and removing stuff at the front, like a print queue or a playlist where you hit skip, and even then lots of people just use ArrayDeque. So don’t stress about it too much. Also you’ve come a long way since the library system, it’s fun to watch!

1

u/sumiitCodes 17d ago

thank you for sharing your thoughts