while(i<numbers.length)
{
for (int j=0;j<s;j++)
{
if (numbers[i]==specifynumbers[j]){
i++;
continue;
}
}
remainnumbers[l]= numbers[i];
l++;
}
{
for (int j=0;j<s;j++)
{
if (numbers[i]==specifynumbers[j]){
i++;
continue;
}
}
remainnumbers[l]= numbers[i];
l++;
}
如果这样的数列
A 1 2 1 2 1....
B 2 1 2 1 ....
B-A=?我猜你可能指的是集合
A 1 3 4
B 1 2 3 4 5 6 7
B-A 2 5 6 7这样的话,你可以用Java的集合类HashSet,或TreeSet
只需要一句话就行
B.removeAll(A);
java里有专门的集合对象。看看~~~~~~~