I have defined an object(Tracker) with four variables and in a class have declared an array of this object:

Tracker track[] = new Tracker[max];

However in a for loop when I try to set the values of the variables The code hangs for no apparent reason.


for (int i = 0; i < track.length; i++){

track[i].agname = agNames[i];

track[i].priority = priority[i];

}


Would anyone have any ideas???


Hilary