persistence@glassfish.java.net

Re: question on List\Arrays &ArrayList

From: James Sutherland <jamesssss_at_yahoo.com>
Date: Wed, 14 Nov 2007 06:09:05 -0800 (PST)

I would recommend using List, it is the most useful collection interface.

Sometimes a Set, Collection or Map makes more sense depending on the model.
Arrays are typically less useful as they are not objects, have no methods,
and cannot resize.


Eve Pokua wrote:
>
>
> Hello,
>
> I was hoping if some body could provide me some thoughts
> on when to use List or Arrays or ArrayList or even Collection. I get
> confuse when writing applications. I tend to use List everytime. It
> seems to work but what if I want to take into account other issues. For
> example, in the case of entity relationships.
>
> Thanks
>
> eve
>


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.oracle.com/technology/products/ias/toplink/ Oracle TopLink , 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  https://glassfish.dev.java.net/javaee5/persistence/ TopLink
Essentials 
Wiki:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence , 
http://wiki.eclipse.org/EclipseLink EclipseLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink , 
http://www.nabble.com/java.net---glassfish-persistence-f13455.html Glassfish
Persistence 
-- 
View this message in context: http://www.nabble.com/question-on-List%5CArrays--ArrayList-tf4804892.html#a13747243
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.