I'm new to this but quite surprised noone started a topic about this question...
My point is the following:
I can see why the 2 if loops are just for fun, very funny

But how can it NOT print '1' ?
the println does simply print out every 'i' sp why not the first element of the arraylist?
Is it a trick question and is the answer: "Yes, we didnt say it didnt print 1 also! Whoahahaha"
that would be somewhat hilarious and not quite intended to get the student to actually grasp more of the study material, and that is a comment directed to Oracle if they actually included such a mind-dumbing && energy-wasting 'trap'
But I guess I should feel stupid and there is a simple explanation hahah!