Difference Between Arrays and LinkedArrays in Java

Help!!!
Friends i want to know the exact difference between Arraya
and Linked Arrays in java.They both look like same in functionalists,but what is the main difference.Any one know the exact answer please provide it.

Replies

  • jgeorge
    jgeorge
    imgopi
    Help!!!
    Friends i want to know the exact difference between Arraya
    and Linked Arrays in java.They both look like same in functionalists,but what is the main difference.Any one know the exact answer please provide it.
    arrays cannot be expanded or increased so we use linked list for dynamic data storage

    For example::
    We want to delete some elements from array then either we have to place zero or we need to rearrange it.
    For dynamic deletion and insertion linked list is used instead arrays.
    But if we do not need these operations then using arrays is sufficient and easier too.
  • jgeorge
    jgeorge
    imgopi
    Help!!!
    Friends i want to know the exact difference between Arraya
    and Linked Arrays in java.They both look like same in functionalists,but what is the main difference.Any one know the exact answer please provide it.
    posted Friday, August 11, 2006 1:34 PM [​IMG]
    [​IMG]
    [​IMG]
    Originally posted by pawar santosh:​
    Can anybody tell me exact difference between Linked List and Array List.​
    Please give Example By Usage of Both in JavaCode.​
    Thanks in Advance.​


    Well Gopi,
    The biggest difference between is

    Linked Arrays are meant for sequential accessing. ArrayList are meant for random accessing.

    Although you can check out the books on Collections for time being I can tell you.

    An Array is a "special" object in Java that has very few methods. You can access the value in the array the [ ] brackets, and you can determine the length (the .length) property, and thats about the extent of the Array. The array has a FIXED size that cannot be changed.

    The ArrayList is part of the Collections Framework. It is a List that is built on top of an array. It provides methods to add to the list (thereby changing the size), as well as to obtain an iterator, and to remove elements, sort elements, and perform searches. Basically, it saves you from having to write that code when using an array.

    The LinkedList is also a List. It essentially provides the same methods as the ArrayList (Java Platform SE 7 ), except the underlying data structure uses objects that contain references to other objects to form a list. This is "similar" to the concept other languages call "pointers" (but not quite the same).


    I hope I make it clear.
  • vinci
    vinci
    array is the homogeneous collection of elements in continuous memory space while linked list is the collection of elements in links.Also array contains reference while linked list doesnt.
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Arrays can hold only a single data format. In case of Linked Lists, it can hold any kind of data and traversal and ordering are easy in Linked List. 😀
  • imgopi
    imgopi
    jgeorge
    posted Friday, August 11, 2006 1:34 PM [​IMG]
    [​IMG]
    [​IMG]
    Originally posted by pawar santosh:​
    Can anybody tell me exact difference between Linked List and Array List.​
    Please give Example By Usage of Both in JavaCode.​
    Thanks in Advance.​


    Well Gopi,
    The biggest difference between is

    Linked Arrays are meant for sequential accessing. ArrayList are meant for random accessing.

    Although you can check out the books on Collections for time being I can tell you.

    An Array is a "special" object in Java that has very few methods. You can access the value in the array the [ ] brackets, and you can determine the length (the .length) property, and thats about the extent of the Array. The array has a FIXED size that cannot be changed.

    The ArrayList is part of the Collections Framework. It is a List that is built on top of an array. It provides methods to add to the list (thereby changing the size), as well as to obtain an iterator, and to remove elements, sort elements, and perform searches. Basically, it saves you from having to write that code when using an array.

    The LinkedList is also a List. It essentially provides the same methods as the ArrayList (Java Platform SE 7 ), except the underlying data structure uses objects that contain references to other objects to form a list. This is "similar" to the concept other languages call "pointers" (but not quite the same).


    I hope I make it clear.
    First thanks friend for giving response and I am clear about it,but am expecting some more in the form of logical manner.
  • manishks
    manishks
    yes it is easy to traverse a linked list rather than array....for array we need consecutive memory locations...but thats not the case with linked list.....😀

You are reading an archived discussion.

Related Posts

ECLECTIC 2012 is a Technical Fest orgainzed by Mandsaur Institute of Technology. There are various technical and non technical events held for students. Events: Code Treasure: Treasure code is a...
Sapience 2011 is Technical Symposium conducted by Sri Vasavi Institute of Engineering and Technology. There are various technical events conducted for students around the nation, that would help them enhance...
For wannabe Entrepreneurs, it is a wonderful thought to receive all the funding which they want. It is through Kickstarter where you can make your dreams come true, provided you...
Hello everyone, I am the newest member here and just wanted to drop by and introduce myself... liked CE... found some intresting Posts.. Superlike
can i get any information about this topic "usb host controller interface"?