About Question enthuware.ocajp.i.v8.2.2015 :
Posted: Wed Jan 19, 2022 5:43 pm
There seems to be an easier explanation. If you observe closely, all but one of the options will result in an ArrayIndexOutOfBoundsException. All of the options involve matrices with a first dimension expression of 4 or 5, yet only one of the options have a 'for' loop termination condition of i < 5. The others therefore end up trying to access the 5th index of an array with only 4 or 5 elements.
In light of the enthuware explanation, I think this wasn't what the question was trying to test. Maybe change the available answer options or recategorise the question?
In light of the enthuware explanation, I think this wasn't what the question was trying to test. Maybe change the available answer options or recategorise the question?