how to compare two arrays with exact index for example
String[] test1 = {"a","b","c","d"};
String[] test2 = {"a","b","c",""};
I tried this
for (int i = 0; i < test1.length; i++) {
for (int j = i; j < test2.length; j++) if (i==j) if (i == j && test2[j] == "" ) {do stuff}
}
// but always give true
now if the comparison start at index 0 for test1 it should be compared only with index 0 for test2 I want to find the empty index (for example index 3 for test2 which is related to test1 index 3) and do some stuff
I read a lot but I have some difficulties, thanks in advance.