I want to keep track of multiple instances of a class without hardcoding a
bunch of variables. I can use either an array or collection it doesnt really
matter to me but I cant seem to get either to work. I cant seem to find an
example of what I want to do anywhere. Im also open to suggestions if their
is a better way to do this.

On Thu, Mar 26, 2009 at 6:34 AM, Stoyan Damov <[email protected]>wrote:

>
> I don't understand what are you really asking? Whether arrays are
> faster than collection classes? Yes, they are faster, but you have to
> manage their contents (insertions, deletions, etc.) yourself.
>
> On Thu, Mar 26, 2009 at 3:31 PM, Josh Dobbs <[email protected]> wrote:
> > Here's what my code looks like...
> >
> >
> > private
> >
> > Collection _cars;
> >
> > Car myCar=
> >
> > new Car(1,1,false,5, "blue");
> >
> > Car myCar2= new Car(1,1,false,5, "red");
> >
> > _cars.add(myCar);
> > _cars.add(myCar2);
> >
> >
> > On Thu, Mar 26, 2009 at 6:18 AM, Josh Dobbs <[email protected]> wrote:
> >>
> >> >You mean like the ones in the java.util
> >> Yes, specifically java.util.collection
> >> >What's a VO?
> >> A VO is basically a class that only contains properties(Value Objects).
> >>
> >>
> >> On Thu, Mar 26, 2009 at 4:53 AM, Mark Murphy <[email protected]>
> >> wrote:
> >>>
> >>> Josh wrote:
> >>> > I want to store objects into an array or collection(whichever is best
> >>> > suited to this in dalvik).
> >>>
> >>> You mean like the ones in the java.util package?
> >>>
> >>> > the objects are basically just VO's all of
> >>> > the same class that i want to keep track of.
> >>>
> >>> What's a VO?
> >>>
> >>> --
> >>> Mark Murphy (a Commons Guy)
> >>> http://commonsware.com
> >>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
> >>>
> >>>
> >
> >
> >
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to