This is a short hand only available when constructing and assigning an array.
String[] array = {"a", "b", "c"};
You can do this though:
List<String> list = Arrays.asList("a","b","c");
As asList can take “vararg” arguments.
This is a short hand only available when constructing and assigning an array.
String[] array = {"a", "b", "c"};
You can do this though:
List<String> list = Arrays.asList("a","b","c");
As asList can take “vararg” arguments.