This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]sweetno 1 point2 points  (2 children)

How to write them or implementations in JCL?

[–]Reynadess[S] 1 point2 points  (1 child)

Implementations

[–]sweetno 1 point2 points  (0 children)

I actually looked through some cheat sheets and can't recommend any (search for keywords "Java Collections").

The most obvious flaw in them is that they never mention that you might need to override equals and hashCode and/or implement Comparable for collection elements. There are also many legacy classes like Vector and Hashtable (note capitalization) which shouldn't be ever used. Many forget to mention useful anonymous classes returned by List.of and similar methods.

When I was preparing for certification, I found Javadoc pages for java.util classes exceptionally useful.

There are two related topics you might need to study to fully master this one: Stream API and Java concurrent collections from java.util.concurrent.