That might work - it depends on what is needed. For instance, that would have 199-XXX come before 1AA-AAA, because it would use alphabetical sorting on the second digit. Whether that is OK depends on the exact requirement (but I suspect it isn't).
Joined: Dec 12, 2008
Andrey Kozhanov wrote:Just put necessary functionality in your AddressComparator class. For example if address is a String, it could be written like this:
Hi Andrey Kozhanov
Thank you very much..
As my requirement it is ok..
subject: Sorting ArrayList with Comparitor Interface for String property