Question: Question 3 (Multiple Choice Worth 4 points) In reference to for-each loops, which of the following statements is true? I. for-each loops can be rewritten


Question 3 (Multiple Choice Worth 4 points) In reference to for-each loops, which of the following statements is true? I. for-each loops can be rewritten as for loops II. an index variable is NOT explicitly coded III. an ArrayIndexOutOfBoundsException will always be thrown I and II only I and III only II and III only I, II, and III None of the statements are true Question 5 (Multiple Choice Worth 4 points) Which is an inappropriate use of a for-each loop? I. when replacing values within an array II. when all values in an array need to be traversed III. when an index variable is required to complete a task I only II only III only I and III only II and III only
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
