Check out example codes for "java instantiate collection with values". It will help you in understanding the concepts better.

Code Example 1

List<Integer> integerArray = Arrays.asList(2, 41, 42, 48);

Learn ReactJs, React Native from akashmittal.com