在查看代码的某个时候,我看到许多方法都指定了注释:
@SuppressWarnings("unchecked")
Run Code Online (Sandbox Code Playgroud)
这是什么意思?
我已将Netbeans设置为在我的Java代码中显示未经检查的警告,但我无法理解以下行中的错误:
private List<String> cocNumbers;
private List<String> vatNumbers;
private List<String> ibans;
private List<String> banks;
...
List<List<String>> combinations = Utils.createCombinations(cocNumbers, vatNumbers, ibans);
Run Code Online (Sandbox Code Playgroud)
得到:
[unchecked] unchecked generic array creation for varargs parameter of type List<String>[]
方法来源:
/**
* Returns a list of all possible combinations of the entered array of lists.
*
* Example: [["A", "B"], ["0", "1", "2"]]
* Returns: [["A", "0"], ["A", "1"], ["A", "2"], ["B", "0"], ["B", "1"], ["B", "2"]]
*
* @param <T> The type parameter
* @param elements …Run Code Online (Sandbox Code Playgroud) PropertyValueFactory对于与建议避免该课程和其他类似课程相关的问题的许多答案(和评论) 。使用这个类有什么问题?