Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2007, 02:41 AM
Authorized User
 
Join Date: Aug 2007
Location: , Tamil Nadu, India.
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 ?

Reply With Quote
  #2 (permalink)  
Old September 4th, 2007, 06:34 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Both extends AbstractList.

- Rakesh
Reply With Quote
  #3 (permalink)  
Old September 6th, 2007, 11:39 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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

see:

http://java.sun.com/j2se/1.4.2/docs/...ArrayList.html
http://java.sun.com/j2se/1.4.2/docs/...inkedList.html

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk
Reply With Quote
  #4 (permalink)  
Old September 11th, 2007, 04:32 AM
Registered User
 
Join Date: Aug 2007
Location: Mumbai, Maharashtra, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to neo.isbackin.thematrix
Default

Hi,

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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.