You didn't provide the compare method required for a Sortable object. On Feb 1, 11:43 pm, Mystique <[email protected]> wrote: > Ok, I did this but runtime error, did I do wrong? > > --- > > public class Sortable { > private String name; > private String age; > > public Sortable(){ > } > public Sortable(String name, String age){ > this.name = name; > this.age = age; > } > > public String getName() { > return name; > } > > public String getAge() { > return age; > } > > } > > --- > > ArrayList test = new ArrayList(); > . > . > . > Sortable qqq = new Sortable(name, age); > ppp.add(qqq); > . > . > . > // Before I try the Collections.sort(), I have error.
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

