Basically my problem is that I don't know how to compare these arrays properly. I have this condition and I have no idea why it doesn't go inside my condition. Are there other ways to compare arrays?
Code:if(A[i][j+1]==B[x+1])
{
x++;
j++;
}
Printable View
Basically my problem is that I don't know how to compare these arrays properly. I have this condition and I have no idea why it doesn't go inside my condition. Are there other ways to compare arrays?
Code:if(A[i][j+1]==B[x+1])
{
x++;
j++;
}
Are you trying to compare Strings for equality? If so, don't use the == operator but use the equals( ... ) method instead. Read the API documentation why.
kind regards,
Jos