Search if an array contains elements from another array
888525Aug 20 2012 — edited Aug 21 2012I have an array whose length is not know(ARRAY 1)
I have another array whose lenth is known(ARRAY 2)
I have to see if array 1 contains elements from array 2 and then form another array which contains elements which are not present in Array1.
The values I am dealing is int values.ALso I am not sure if i should be using Arrays or some other collection.
I tried to loop through one and compare other but this gives arrayIndexoutOfBound exceptionas the length of array 1 is unknown.
Please suggest how to do this.
Thanks,