how to create a list from a string java code example Example: java create list of strings List<MyType> myList = new ArrayList<>();