Sept. 29th The java Standard class libraray contains an umber of important interfaces. The Comparable, List, Iterator, and ListIterator interfaces are part of the AP Java subset and are described here. The List, Iterator, and ListIterator interfaces are required for the AB exam only. The Comparable interface is defined in the java.lang package. It contains only mone method, compareTo, which takes an object as a parameter and returns an intevfer. This method is listed in Figure 5.4. This interface gicves us a way to compare one object to another. One object calls the method and passes another object as a paramater like this: kobj1.compareTo(obj2) < 0 (minus the k on the front there) int compareTo(Object Obj) Compares the executing object oto the parameter to determine their relative rodering. Returns an integer that is less than ,equal to, or greater than zero if the executing object is less than equal to, or grater than the parameter, respectively. The integer that is returned from the compareTo method should be negative if obj1 is less than obj2, 0 if they are equal, and psoitive if obj1 is greater than obj2. It is up to the program designer to decide what it means for one object of that class to be less than, equal to, or gerer than another. In chapter 3, we mentioned theat the Stringclass contains a compareTo method;. The String fclass has this method because it implements the Comparable interface. ATHe method bases the comparison on the lexicographic ordering defined by the Unicode character set. T