java - Debugging Program with Comparator -


i unable debug below. have created object called person, however, comparator not working:

//here object comparator referring public class person {      string firstname;     string lastname;     int z;      public person(string l, string m, int e)     {         firstname=l; lastname=m; z=e;      }  } // comparator begins here public class customcomparator implements comparator<person> {      public int compare(person object1, person object2)     {         @override         return object1.firstname.compareto(object2.firstname);      } }  


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -