primitive types accordinglywe show java programobjectsort javathat sorts an array of person objects (last seen in the classdataarray java program in java code for sorting objects the algorithm used is the insertion sort from the last section the person objects are sorted on lastnamethis is the key field the objectsort java program is shown in listing listing the objectsort java program /objectsort java /demonstrates sorting objects (uses insertion sort/to run this programc>java objectsortapp ///////////////////////////////////////////////////////////////class person private string lastnameprivate string firstnameprivate int age//public person(string laststring firstint /constructor lastname lastfirstname firstage //public void displayperson(system out print(last namelastname)system out print("first namefirstname)system out println("ageage)//public string getlast(return lastname/end class person /get last name ///////////////////////////////////////////////////////////////class arrayinob private person[aprivate int nelems/ref to array /number of data items