这样写,编译器报错:

jshell> List<?> unknows = new ArrayList<?>()
| Error:
| unexpected type
| required: class or interface without bounds
| found: ?
| List<?> unknows = new ArrayList<?>();
| ^----------^

可以这样写:

jshell> List<?> unknows = new ArrayList<String>()
unknows ==> []