例如:
int[] a = [0,1,2,3,4,5];
int[] b = [3,4,5,6,7,8];
count = 3;
数组不必是连续数字。我如何获得这些数组之间相等的值的数量?
编辑:所以我尝试了以下操作:
List<int[]> w = Arrays.asList(winning);
List<int[]> s = Arrays.asList(F1Select);
w.retainAll(s);
int equalNums = w.size();
但是我收到了 retainAll 行的以下错误:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException
at java.util.AbstractList.remove(Unknown Source)
at java.util.AbstractList$Itr.remove(Unknown Source)
at java.util.AbstractCollection.retainAll(Unknown Source)