Hi!! Thanks for the reply.Well I guess I was not very precise in my question.I want the difference between a single linked list and a ArrayList.I think only a double linked list can be travelled bidirectionally not a single linked list.So I am still not sure about the difference. One more difference between hashtable and hashmap is that Hashmap accepts null values but Hashtable doesn't.I am not sure whether this null values refers to the key or to the value. Please reply in this context.
Joined: Jul 26, 2004
Linkedlist does'nt have any size..i mean, it is dynamic in size...! Where as ArrayList is not. It do have a size..,if it comes out of its initial size..it will increase it by half it's current size..and it will maintain the objects in array..but linkedlist is not like that. It dynamically adds the objects to the end. And ArrayList is prefarable when size of the list is known or growth rate of the list known...
Joined: Jan 29, 2003
I can never keep this in my head, so I made a Collections Crib Sheet. It says ArrayList is faster for append and get by index. LinkedList is faster for insert and delete. I'm pretty sure I got those words from a Sun newsletter.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi