i have 2
String array one is super of other and i have to get all values which are not in sub array:chname2-subarray and chname1-super array
for(int j=0;j<chname2.length;j++)
{
for(int k=0;k<chname1.length;k++)
{
if(!chname1[k].equals(chname2[j]))
out.println(chname1[k]);
}
}
I'm not getting the values which not equal
and i want them to be printed only once is the logic proper?
Can anyone help me?