Multiple Choice
Consider the following code snippet: String[] data = { "abc", "def", "ghi", "jkl" };
String [] data2;
In Java 6 and later, which statement copies the data array to the data2 array?
A) data2 = Arrays.copyOf(data, data2.length) ;
B) data2 = Arrays.copyOf(data, data.length) ;
C) data2 = Arrays.copyOf(data, data.size() ) ;
D) data2 = Arrays.copyOf(data) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q10: Which one of the following statements is
Q70: What is the output of the code
Q71: Consider the following 2-dimensional array. Select the
Q72: Which statements are true about the buffer
Q73: Assume the array of integers values has
Q77: Which code snippet calculates the sum of
Q78: What is the value of the count
Q79: Which statements about array algorithms are true?<br>I.
Q80: Consider the following line of code:<br>Int[] somearray
Q82: Your program needs to store an integer