AP Computer Science Amediummcq1 pt

In the enhanced for loop for (int x : arr), the variable x is

A.a copy of each element
B.the element itself
C.the index
D.the array reference

Explanation

Core Concept

Primitives are copied into x.

Correct Answer

Aa copy of each element

More Unit 6: Array practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 6: Array Questions →