Collections

This post tries to deal with some frequently useful features of Java collection API. As we all know, the main types of Java Collections include the following:

With that said, let us explore the different types of List :

CopyOnWriteArrayList(COWAL) will perform better when collection size is small and there are more frequent reads and less write operations.

Now let us explore the different types of Sets :

Now let us explore the different types of Maps :

Some other important concepts in the Java Collection API: