jaliyahskt510
jaliyahskt510
18.10.2019 • 
Engineering

Analyze the following code:
double array = { 1, 2, 3); arraylist«double> list = new arraylist◇(arrays.aslist(array)) system.out printn(list); tem.out.printnlist
a. the code is correct and displays [1.0, 2.0, 3.0].
b. the code has a compile error because aslist(array) requires that the array elements are objects.
c. the code is correct and displays [1, 2, 3].
d. 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.

Solved
Show answers

Ask an AI advisor a question