エラー:
The method add(capture#1-of ?) in the type List<capture#1-of ?> is not
applicable for the arguments (String)
コード:
List<?> to = new ArrayList<Object>();
to.add(new String("here"));
はジェネリック型 List であるためList<?>
、任意の型にすることができるのに、add メソッドで String を受け入れないのはなぜですか?