You simply aren't allowed to do this. It says this in JLS 15.9:
If TypeArguments is present immediately after new, or immediately before (, then it is a compile-time error if any of the type arguments are wildcards (§4.5.1).
A list instance never has a bounded type: a list is always a list with elements of a particular type.
It is only list variables which can be bounded, in order to store lists with elements of particular types within those bounds.
So, this would be fine:
ArrayList<?> params = new ArrayList<SomeType>();
or
ArrayList<?> params = new ArrayList<>();
That's not to say that you can't use bounds on the RHS at all:
new ArrayList<List<?>>()
would be fine, because List<?>
isn't a wildcard (because syntactically wildcards always start with ?
).