Solved

Consider the Following Code Snippet

Question 21

Multiple Choice

Consider the following code snippet:
String[] data = { "123", "ghi", "jkl", "def", "%&*" };
Which statement sorts the data array in ascending order?


A) data = Arrays.sort() ;
B) Arrays.sort(data) ;
C) data = Arrays.sort(data.length) ;
D) data = Arrays.sort(data) ;

Correct Answer:

verifed

Verified

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

Related Questions