required type collection provided list java code example
Example: declaring collection java
import java.util.Collection;
import java.util.ArrayList;
Collection<Integer> fibonacci = new Arraylist<Integer>();
import java.util.Collection;
import java.util.ArrayList;
Collection<Integer> fibonacci = new Arraylist<Integer>();