convert [] to list java code example
Example 1: Create ArrayList from array java
new ArrayList<>(Arrays.asList(array));
Example 2: java String[] to List
import java.util.*;
...
String[] strings = {"Lula", "José Aparecido", "Carlos Minc"};
List<String> list = Arrays.asList(strings);
Example 3: Create ArrayList from array java
new ArrayList<>(Arrays.asList(array))