209k views
2 votes
An array can easily be stepped through by using a ________.

A) for loop
B) reference variable
C) named constant
D) null value
E) None of these

User Hepabolu
by
8.9k points

1 Answer

2 votes

Final answer:

The correct answer is A) for loop.

Step-by-step explanation:

The correct answer is A) for loop. An array is a data structure that holds a fixed number of elements of the same type. A for loop is commonly used to iterate through each element in an array. Here is an example:

int[] numbers = {1, 2, 3, 4, 5};
for(int i = 0; i < numbers.length; i++) {
System.out.println(numbers[i]);
}
User Onestone
by
7.6k points