?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Array Values Within Array Values

APCSA-IL1FWU

Consider the following code segment.

int[] n = {8, 4, 5, 1, 7, 2, 3, 6};
System.out.println(n[n[n[n[6]]]]);

What is printed as a result of executing the code segment?

A

3

B

4

C

5

D

6

E

7