how to add multiple values to list in java in one line code example
Example: how to add all list elements at once in java
import java.util.*;
List<Integer> l = new ArrayList<Integer>();
l.addAll(new ArrayList<Integer>(Arrays.asList(5,6,8,11)));
import java.util.*;
List<Integer> l = new ArrayList<Integer>();
l.addAll(new ArrayList<Integer>(Arrays.asList(5,6,8,11)));