Tôi đã đặt Netbeans để hiển thị cảnh báo chưa được kiểm tra trong mã Java của mình, nhưng tôi không hiểu lỗi trên các dòng sau:
Cung cấp:
[unchecked] unchecked generic array creation for varargs parameter of type List[]
Nguồn phương pháp:
/** * 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 The type parameter * @param elements An array of lists * @return All possible combinations of the entered lists */ public static List createCombinations[List... elements] { List returnLists = new ArrayList[]; int[] indices = new int[elements.length]; for [int i = 0; i