data collection methods in jav code example
Example 1: declaring collection java
import java.util.Collection;
import java.util.ArrayList;
Collection<Integer> fibonacci = new Arraylist<Integer>();
Example 2: how to define a collection in java
List<String> list = Arrays.asList("Lars", "Simon");