File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which one is better

 
Vijay Kumar
Ranch Hand
Posts: 260
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

We have arraylist & LinkList which one is better in performance

thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will never understand why people ask these bizarre open-ended questions :roll:

Performance at doing what task?

As an exercise for the student - your task is to go study the JavaDocs for these two classes. Look at the functionality in each one and decide for yourself which class is suitable for your particular problem. If both will handle your job, examine the API (and if necessary, the source code) to determine which class does more work to accomplish its functions.

That is homework to be handed in next week.

Bill
 
Vijay Kumar
Ranch Hand
Posts: 260
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I will never understand why people ask these bizarre open-ended questions


Thanks
Bill
 
steve souza
Ranch Hand
Posts: 862
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both are well suited for certain tasks so there is no 'better' or 'worse'. I googled and came up with the following that lists pros and cons of the various collections including the ones you mentioned. Here it is:

http://java.sun.com/docs/books/tutorial/collections/implementations/list.html
[ January 18, 2007: Message edited by: steve souza ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic