This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ArrayList and LinkedList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ArrayList and LinkedList" Watch "ArrayList and LinkedList" New topic

ArrayList and LinkedList

Tom Tang
Ranch Hand

Joined: Dec 24, 2000
Posts: 133
What's the difference between ArrayList and LinkedList? If we don't care about speed, it seems to me that LinkedList can replace Arraylist anywhere. Is it also true vice versa? What standard can we use when deciding to use ArrayList or LinkedList?

Sun Certified Java Programmer
George Toronto
Ranch Hand

Joined: Dec 30, 2000
Posts: 78
In my view, the different points are the following:
1)Positional access has constant time performance in ArrayList and VEctor, but linear time in LinkedList.
2)in most cases the primary implementation ArrayList is the best choice for implementing listd. Where frequent insertions and deletions occur inside a list, a LinkedList can be worth considering.
wood burning stoves
subject: ArrayList and LinkedList
Similar Threads
PMD- Position literal first in string comparisions
Arraylist and Linkedlist
ArrayList vs LinkedList
advantage Doublylink list over linklist
ArrayList vs LinkedList !!