A

Admin • 828.03K Points
Coach

Q. Which method is used to sort an array in Java?

  • (A) Collections.sort()
  • (B) Arrays.sort()
  • (C) array.sort()
  • (D) Sort.array()
  • Correct Answer - Option(B)
  • Views: 13
  • Filed under category Java
  • Hashtags: Java Array

Explanation by: Admin
Arrays.sort() from the java.util package is used to sort arrays.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.