[Solved] Java: Sort List on basis of particular index [closed]
Don’t use getClass().toString() to compare types. Use instanceof and try to group types by common interfaces when possible. For example CharSequence is a common interface for String, StringBuilder, and StringBuffer. Here is one way. You may want to rework the compare method to compare whatever types you have such as Date or URL or custom … Read more