Hi,
I have two arrays of integers. i need to compare each element of one
array with each element of another array.
say..one master list, from 1 to 100 in one array.
and another list, from 20 to 40 in another array.
After comparision of two arrays, it should return a another arraylist
which should contain only 1 to 19 and 41 to 100.
how to do this?
Thanks for your inputs.
Wibble - 23 Jun 2005 03:34 GMT
> Hi,
> I have two arrays of integers. i need to compare each element of one
[quoted text clipped - 6 lines]
> how to do this?
> Thanks for your inputs.
Isn't school over yet?
Andrew Thompson - 23 Jun 2005 13:31 GMT
(snip description)
> how to do this?
If you are having trouble knowing 'where to begin',
check Patricia Shanahan's advice at..
<http://home.earthlink.net/~patricia_shanahan/beginner.html>
Note that a better group for those starting in Java is
'comp.lang.java.help'.
HTH

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Nag - 23 Jun 2005 19:16 GMT
I should have used some java "techie" terms here...
any how, i got the solution..
I created two sets of data. and used following method:
set1.removeAll(set2)..
removeAll method removes from set1 all of its elements that are
contained in the specified collection (here set2)...