那么如何在 Java 中执行以下操作?
List<String> strings = new ArrayList<String>();
JAXBElement<List<String>> jax = new JAXBElement<List<String>>(new QName("strings"), List<String>.class, strings);
该问题特别发生在 List.class 中,返回的错误是:
Multiple markers at this line
- List cannot be resolved to a variable
- String cannot be resolved to a variable
- Syntax error on token ">", void expected after this token