Link to home
Start Free TrialLog in
Avatar of haneefnb
haneefnb

asked on

what is the difference between ArrayList and LinkedList?

Hi , plz tell me what is the difference b/w ArrayList and LinkedList? why we go for LinkedList, instead of ArrayList
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

ArrayList is backed by an array. LinkedList is good for use as a queue or where deletions from the head are required
Avatar of haneefnb
haneefnb

ASKER

Tell me the schenario which to use when?
>>Tell me the schenario which to use when?

Well i just have ;-) You can use one for your own queue
arraylist is good for getting and setting items by index
linkedlist is best when you only need to access objects at the head/tail
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
haneefnb, can you explain why you ignored all comments but the last please?