Final answer:
A for-each loop cannot be rewritten as a for loop and an index variable is not explicitly coded. Additionally, an ArrayIndexOutOfBoundsException will not always be thrown in a for-each loop.
The correct statement is I and II only.
Step-by-step explanation:
The correct statement is I and II only. In a for-each loop, you cannot rewrite it as a for loop because it is designed specifically for iterating over collections or arrays. The index variable is not explicitly coded in a for-each loop; instead, it is automatically handled by the loop. Finally, an ArrayIndexOutOfBoundsException will not always be thrown in a for-each loop since it does not rely on an index.
A for-each loop cannot be rewritten as a for loop and an index variable is not explicitly coded. Additionally, an ArrayIndexOutOfBoundsException will not always be thrown in a for-each loop.
The correct statement is I and II only. In a for-each loop, you cannot rewrite it as a for loop because it is designed specifically for iterating over collections or arrays. The index variable is not explicitly coded in a for-each loop; instead, it is automatically handled by the loop. Finally, an ArrayIndexOutOfBoundsException will not always be thrown in a for-each loop since it does not rely on an index.
A for-each loop cannot be rewritten as a for loop and
The correct statement is I and II only.