Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 30th, 2007, 02:41 AM
Authorized User
Join Date: Aug 2007
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default diff between arraylist and linkedlist

hi what a diffrence between arrylist and linked list ?

Old September 4th, 2007, 06:34 AM
Friend of Wrox
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

Both extends AbstractList.

- Rakesh
Old September 6th, 2007, 11:39 AM
Friend of Wrox
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts

You can use a LinkedList to implement a stack or queue, because each element is linked both to its predecessor and to its successor.



Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk
Old September 11th, 2007, 04:32 AM
Registered User
Join Date: Aug 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to neo.isbackin.thematrix


Well, the difference between an ArrayList and LinkedList is between the Algorithm used to construct both.

As the name suggests, LinkedList uses 'LinkedList' Algorithm which is Doubly LinkedList. So it every element in it is connected to its previous element and next element which is not the case in ArrayList.

The usage of them is suggested dependending upon the design of ur code. Like Traversal and Addition is faster in the case of ArrayList than LinkedList but Deletion of one element is Faster in case of LinkedList. So depending upon your requirement, you can use them.

Similar Threads
Thread Thread Starter Forum Replies Last Post
LinkedList<T>, AddTail, EX9_22, pages 557-559 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 1 January 26th, 2010 07:03 PM
What's behind the 'Equal' and 'LinkedList' buttons Everard Hughes BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 1 September 27th, 2008 08:44 AM
Diff between C & C# yukijocelyn C# 4 November 27th, 2007 06:16 AM
What is the diff between "=" and ":=" ix_ly Excel VBA 1 October 24th, 2005 11:10 PM
multi-leveled linkedlist saiyedriyaz BOOK: Beginning Java 2 1 May 29th, 2004 03:00 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.