Analyze the following code:

```
double[] array = {1, 2, 3};
ArrayList list = new ArrayList<>(Arrays.asList(array));
System.out.println(list);
```
a. The code is correct and displays [1, 2, 3].
b. The code is correct and displays [1.0, 2.0, 3.0].
c. The code has a compile error because an integer such as 1 is automatically converted into an Integer object, but the array element type is Double.
d. The code has a compile error because asList(array) requires that the array elements are objects.

d

Computer Science & Information Technology

You might also like to view...

SQL keyword commands are typically written in:

A) uppercase letters. B) italic letters. C) lowercase letters. D) bold letters.

Computer Science & Information Technology

Which Windows feature is an automatic grouping created to organize saved files?

A) Director B) Folder C) Library D) Compression

Computer Science & Information Technology