Check out example codes for "how to define a collection in java". It will help you in understanding the concepts better.

Code Example 1

List<String> list = Arrays.asList("Lars", "Simon");

Code Example 2

import java.util.Collection;

Learn ReactJs, React Native from akashmittal.com