What allows you to create a list from this array?

Given:
int[] myArray = new int[] {1, 2, 3, 4, 5};
What allows you to create a list from this array?

Given:
int[] myArray = new int[] {1, 2, 3, 4, 5};
What allows you to create a list from this array?

A.
List myList = myArray.asList();

B.
List myList = new ArrayList(myArray);

C.
List myList = Collections.fromArray(myArray);

D.
List myList = Arrays.asList(myArray);



Leave a Reply 0

Your email address will not be published. Required fields are marked *