Java OCA OCP Practice Question 561

Question

What are the names of the methods to do searching and sorting respectively on arrays?

  • A. Arrays.binarySearch() and Arrays.linearSort()
  • B. Arrays.binarySearch() and Arrays.sort()
  • C. Arrays.search() and Arrays.linearSort()
  • D. Arrays.search() and Arrays.sort()


B.

Note

The sort() and binarySearch() methods do sorting and searching, respectively.




PreviousNext

Related