create list java 8 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>();
List<String> strings = Arrays.asList("foo", "bar", "baz");
List<MyType> myList = new ArrayList<MyType>();