Solved

Consider the Following Code Snippet: in Java 6 and Later

Question 97

Multiple Choice

Consider the following code snippet: Consider the following code snippet:   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) ; 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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions