Chapter 11
Sorting and Searching
OBJECTIVES
- To introduce sorting and searching support available in java.util package
- To introduce all static methods of Arrays and Collections classes for array and list processing
- To copy an array and fill array with an object using Arrays class
- To convert an array into a list using Arrays.asList() method
- To compare two array objects and iterate array elements
- To sort primitive arrays using Arrays.sort() method
- To sort primitive object arrays using Arrays.sort() method
- To sort user-defined object array using Comparable interface with Arrays
- To sort user-defined object array using Comparator interface with Arrays
- To explain why do we need both comparable and comparator types
- To search sorted arrays for a key ...
Get JAVA Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.