Possible Duplicate:
In Java, how can I test if an Array contains a certain value?
I'm trying to do a sort of:
for(String s : myArray)
{
if(s is in newArray) //how do you test this? i want something like
//if(newArray.indexOf(s)!=-1)
{
//do nothing
}
else
{
//add to newArray
}
}
can someone please help?