In this mini-Fragment episode, Donn talks about Item #12 of the Effective Java series - Consider Implementing Comparable. You'll learn about how you can use the Comparable interface to give your code the extra sorting boost it needs. Work with Arrays.sort(), Collections utilities and even sorted data structures. Donn breaks down what it takes to implement the compareTo method of the Comparable interface.
Copyright 2024 Spec Network, Inc.