I want a Stack Data Structure ( LIFO ). I see Stack (which inherits from Vector), I understand using Vectors is out, correct? Is ArrayList the one I want to use? The only thing I do need is to be able to get the size without having to build a function myself.
Are you using this for a Cattle Drive assignment? If not, you may be better off posting in another forum. I'm not sure which forum would be most apropos, but I'm thinking Java in General or the Beginning Java forum.
I think that LinkedList would be a better fit than ArrayList, although I would probably use Stack if I needed that behavior (which I haven't needed for any of the projects I've worked on to date). If you only need the size, ArrayList would be just fine. [ April 19, 2006: Message edited by: Marilyn de Queiroz ]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: May 21, 2005
Thanks, I will give it a shot and see what you say when you see my assignment 5.