Limited access

Upgrade to access all content for this subject

Consider the following code.

String[] people = {"Hank", "George", "Carol", "Johnsie"};
int d = 0;

for (int i=1; i<people.length; i++)
{
    d+=people.length;
}
System.out.println(d);

What is printed as a result of executing this code?

A

12

B

16

C

18

D

22

E

A syntax error is encountered.

Select an assignment template