What is output of the following code:

```
public class Test {
public static void main(String[] args) {
int list[] = {1, 2, 3, 4, 5, 6};

for (int i = 1; i < list.length; i++)
list[i] = list[i - 1];

for (int i = 0; i < list.length; i++)
System.out.print(list[i] + " ");
}
}```
a. 1 2 3 4 5 6
b. 2 3 4 5 6 6
c. 2 3 4 5 6 1
d. 1 1 1 1 1 1

d

Computer Science & Information Technology

You might also like to view...

An administrator is deploying three B/G wireless access points in a new office location. Which of the following channels eliminates interference?

A. 1, 6, and11 B. 3, 6, and 9 C. 11,16, and20 D. 36, 40, and 44

Computer Science & Information Technology

When all of a superclass's subclasses need a method, but each needs a different behavior from that method, the superclass should declare the method as a(n) ____ method.

A. static B. private C. class D. abstract

Computer Science & Information Technology