I'll show you what happens during debug. There shouldn't be any null values, since I initiate the Array List without a number of spots. When I get right before the part, the size is 6 and the contents of studentRequest are said to be thus:
S09
C09
L09
M09
G09
H09
null
null
null
null
I'm guessing those nulls shouldn't affect it and have something to do with the ArrayList class? Anyways, at this point requests is empty. Stepping once does nothing, then when I do it once more it gives me the exception.
When I print it out instead of adding it to the new Array List, I get this:
S09
C09
L09
M09
G09
H09
and then it exits the for loop, as it should. For some reason, it seems as if the Null Pointer Exception would be coming from the .add(Object obj) method, and not the .get(int index) method. I don't see how you could get that type of exception, though.
I did figure out that I forgot to remove the stuff from studentRequest in the method that calls that, but that shouldn't have an effect.
Hahahaha, I'm an idiot. I never actually initialized requests. Just had ArrayList requests.
You wouldn't happen to know anything about apcslib, would you, Mxy?
Nvm. It looks like I've got nearly everything done with my Class Scheduler except for sorting the students within each class and printing out specific Student or Class Schedules, which will all be easily done. I think I should make more text files, though. Especially ones that test having more students apply to a class than there is space for.