Code:
if ((acc_info [2][a]).equals(ac_num)) {
either
a. acc_info is null or
b. acc_info [2] is null or
c. acc_info [2][a] is null or
d. ac_num is null
acc_info is null if there was no call to acc_info = new String[][],
Code:
private int search_array_2 (String ac_num) {
int line= 0;
String answer = null;
for (int a = 0; a <1000 ; a++){
if ( acc_info[2][a] != null && acc_info[2][a].equals(ac_num) ) {
line = a; // return a;
a = a + 1000;
}
else {
line = -1;
}
}
return line; // return -1; // would have been straight forward
}
i'm thinking ...
acc_info [2][a] is null... most likely reason is you allocated a buffer for x (1000) amount of records but it has not been completely filled.
N.B.
there does seem something non-OO about a double indexed array of strings.
ASIDE
Code:
a = a+ 1000; // i guess you want a < 1000 == false
just say
Code:
break; // this will jump out of the inner most loop