initialize a list of type string java while declaration code example
Example 1: java instantiate list with value
List<String> strings = Arrays.asList("foo", "bar", "baz");
Example 2: list java initialize
List<MyType> myList = new ArrayList<MyType>();