java - Order objects based on ordering of member variables without comparator -


I have something

  personal personal age person; The name of the private string;  

and I want to sort them automatically using something like Arrays.sort () , because young age comes before high age.

A The common way to do this is with a comparator, but I have a cleaner way of doing this, along with very useful utility functions?

Apply your class.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -