after sortinglast namecreswellfirst namelucindaage last nameevansfirst namepattyage last namehashimotofirst namesatoage last namesmithfirst namedocage last namesmithfirst namelorraineage last namesmithfirst namepaulage last namestimsonfirst namehenryage last namevangfirst nameminhage last namevelasquezfirst namejoseage last nameyeefirst nametomage lexicographical comparisons the insertsort(method in objectsort java is similar to that in insertsort javabut it has been adapted to compare the lastname key values of records rather than the value of primitive type we use the compareto(method of the string class to perform the comparisons in the insertsort(method here' the expression that uses ita[in- getlast(compareto(temp getlast() the compareto(method returns different integer values depending on the lexicographical (that isalphabeticalordering of the string for which it' invoked and the string passed to it as an argumentas shown in table table operation of the compareto(method compareto( return value < > equals for exampleif is "catand is "dog"the function will return number less than in the objectsort java programthis method is used to compare the last name of [in- with the last name of temp stability sometimes it matters what happens to data items that have equal keys for exampleyou may have employee data arranged alphabetically by last names (that isthe last names were used as key values in the sort now you want to sort the data by zip codebut you want all the items with the same zip code to continue to be sorted by