how to create an colection in java code example
Example 1: import collections in java
import java.util.Collection;
Example 2: java instantiate collection with values
List<Integer> integerArray = Arrays.asList(2, 41, 42, 48);
import java.util.Collection;
List<Integer> integerArray = Arrays.asList(2, 41, 42, 48);