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