r/javahelp • • Aug 24 '24

how to understand Java Collection Frameworks ?

in my Java backend learnings, I have created projects and learned Java, Spring Boot, JDBC, and many other things but I find it difficult to grasp Java collections, I have used it while using projects as needed, but I don't know anything, so how should I learn that I want to solve basic questions for interview purpose(definitely not competitive level just basic), any resource or ideas appreciated.

0 Upvotes

14 comments sorted by

View all comments

4

u/[deleted] Aug 24 '24

The most used collections are lists and maps. Play with ArrayList and HashMap. Add items, remove them, count them, iterate over them, sort them. Do it first with regular methods, then later try the streams API for filtering, sorting, and “mapping”.

-2

u/devpt321 Aug 24 '24

Where should I can do practice

9

u/ichwasxhebrore Aug 24 '24

You know about spring and jdbc but not about how to add stuff to a list???

2

u/sojufles Aug 24 '24

You can start by making simple unit tests.

2

u/[deleted] Aug 24 '24

Text editor, javac to compile and java command to run

2

u/WishboneFar Aug 25 '24

Search Github repos for exercises. Clone them and practice.

3

u/ByGoalZ Aug 24 '24

Leetcode

1

u/devpt321 Aug 25 '24

Not competitive, it takes too much time. I should make better projects instead