int nElems=10;
int i;
String A[]=new String [nElems];
System.out.println("Write 10 passwords");
for (i=0;i<10;i++)
{
A[i]=entrada.next();
}
String searchKey;
System.out.println("Give me your password");
searchKey=entrada.next();
for(i=0;i<nElems;i++)
if(A[i]==searchKey)
break;
if(i==nElems)
System.out.println("Incorrect");
else
System.out.println("Correct");
please what´s wrong?? it always print "incorrect" though the password is there.!!!