What is the difference between array and arraylist?
what is the difference between arraylist and linkedlist?

Answers were Sorted based on User's Feedback



What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / g.arun

Array is not growable and Arraylist is growable

We can access elements in a Arraylist randomly and in
LinkedList we cannot(means for accessing an element we have
traverse from first elemet in Linkedlist.

Is This Answer Correct ?    41 Yes 5 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / madhu sudana rao

first one:
array is fixed length,arraylist is growing array(means
they have no fixed length , if u add more the size
arraylist size incress and vise versa)
seond one:
if add and remove the elements in the middle takes more
time by using arrylist in that time use linkedlist
arrylist is good for retiveing the elements in specific
position
arraylist is faster than linkedlist for random accesing
of elemnets

Is This Answer Correct ?    20 Yes 1 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / satya

Every body missed out one main difference i.e Array used to
store primitive data(of type int,char etc.,) values where
as Arraylist is user to store objects.

Is This Answer Correct ?    12 Yes 1 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / pankaj gupta

in array the size of array is fixed but in case of arraylist
we can add element dynamicaly.
in linkedlist we deal with pointers but their is no pointers
in case of arraylist(eg.c#).

Is This Answer Correct ?    14 Yes 5 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / suresh

we can't change array size diyamically.

Is This Answer Correct ?    5 Yes 1 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / ram

array contain a similar data type and array size is fixed i.e
dynamically its size can't be changed.
but arraylist can store more then one data type and its size
can be changed dynamically.
one major difference is that,array used to store primitive
data type(i.e. int,char etc) while arraylist is used to
store objects.

Is This Answer Correct ?    4 Yes 1 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / anuj

array can,t have count and capacity method, but in array list have count and capacity method,

Is This Answer Correct ?    1 Yes 0 No

What is the difference between array and arraylist? what is the difference between arraylist and li..

Answer / sureshkumar

Using array we can stored value by using index.

Using arraylist we can stored value by using key.so we can
retrive the values by using key and we can remove the value
from arraylist by using key.So the array overflow problem
wont happen.

Is This Answer Correct ?    8 Yes 26 No

Post New Answer

More Core Java Interview Questions

What is the immediate parent class of the Applet class?

1 Answers  


How long will it take to learn java?

0 Answers  


Can an abstract class be a final class?

0 Answers  


class A{ m2(){ } } class B extends A{ m2(){ } } class c extends B{ m2(){ } } class my_class extends c{ m2(){ } pulic static void main(){ ...My_class a = new my_class(); super.super.super.m2(); is this is leagal if not find what is the legal procedure in order to call A's version of m2(); }

8 Answers   Logica CMG,


Can we call virtual funciton in a constructor ?

0 Answers   XX,






When should I use abstract classes and when should I use interfaces?

2 Answers  


how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application

0 Answers   SAP Labs,


What an i/o filter in java programming?

0 Answers  


How hashmap works in java?

0 Answers  


What is hashtable and explain features of hashtable?

0 Answers  


What is ResourceBundle class?

1 Answers  


what is use of marker interface? give me good example?

2 Answers  


Categories