# Introduction Comparing objects and sorting them is a common requirement in many applications. Java provides two interfaces, `Comparator` and `Comparable`, that are used to allow classes to define their own natural order based on some criteria.
Click the virtual machine below to start practicing