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

What is return data type?

548


What are heap memory and stack memory and what are memory tables.

502


What is an exception? difference between Checked and Unchecked exception in Java

548


What restrictions are placed on method overloading in java programming?

561


Why 1 is not a prime number?

540






What is a pattern what is an anti pattern?

498


Can final class have constructor?

490


what is aggregation in java?

578


What are white spaces in java?

518


What is difference between array and arraylist in java?

454


What are java packages?

575


Is integer passed by reference in java?

556


How to do a true java ping from windows?

610


Is an object null?

547


Can we have more than one package statement in the source file?

632