String[] mT={"A","B"};
String[] mT2={"A","BB","C","A","B","C","C","A","D","F","B"};
for(int i=0;i<mT.length;i++)
{
for(int j=0;j<mT2.length;j++)
{
if(mT[i].equals(mT2[j]))
{
System.out.println("Equal Values are :"+mT2[j]);
}
else
{
System.out.println(" Not- Equal Values are :"+mT2[j]);
}
}
}
output :
Equal Values are :A
Not- Equal Values are :BB
Not- Equal Values are :C
Equal Values are :A
Not- Equal Values are :B
Not- Equal Values are :C
Not- Equal Values are :C
Equal Values are :A
Not- Equal Values are :D
Not- Equal Values are :F
Not- Equal Values are :B
Not- Equal Values are :A
Not- Equal Values are :BB
Not- Equal Values are :C
Not- Equal Values are :A
Equal Values are :B
Not- Equal Values are :C
Not- Equal Values are :C
Not- Equal Values are :A
Not- Equal Values are :D
Not- Equal Values are :F
Equal Values are :B
i'm getting duplicates values, how can i avoid the duplicates for not-equals.. any one help me. thanks in advance.. :)