1) Try putting a breakpoint on it and using a debugger
2) If you don't know how to do this learn it quickly (shouldn't take more
than a few hours)
3) when you message the list, include a detailed descriptions of the current
errors you are getting from the virtual machine.

Debugging through the code a line at a time helps a lot, but after you've
done a good job the mailing list can help with obscure android relating
problems. (But this seems like a *general* java question, try asking on a
java forum, or a java IRC channel).

Kris

On Wed, Feb 2, 2011 at 12:48 AM, Mystique <joven.ch...@gmail.com> wrote:

> sorry shd be:
>
> ArrayList qqq = new ArrayList();
>
> What is wrong with my code?
>
> On Feb 2, 1:43 pm, Mystique <joven.ch...@gmail.com> 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to