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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can java object be locked down for exclusive use by a given thread? : Java thread

764


Can we override constructor?

752


What are the kinds of polymorphism?

817


What is the difference between static binding and dynamic binding?

779


How can you set an applet’s height and width as a percentage?

701


What are local variables?

785


What does a void function return?

745


How to access arraylist elements in java?

692


How is final different from finally and finalize?

670


Is empty set an element of empty set?

817


Can you declare the main method as final?

706


Print Vertical traversal of a Binary Tree.

785


Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?

806


what is singleton in java?

783


Which variables are stored in heap?

751