Difference between array and arraylist.

Answer Posted / bhavani

ARRAY:collection of same data items.
2.array is always of fixed size.
3.initializing an array is too long,then it results in wastage
of memory in heap.
ARRAYLIST : Collection of different data objects.
2.Dynamic in nature.
3.automatic resizing of the list.
4.methods used is:add,remove,insert,clear,sort,reverse....

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is this () in java?

749


Can list contain null in java?

866


How will you reverse a singly-link list?

759


How many types of operators are there?

711


Can we create object of inner class in java?

671


How are observer and observable used in java programming?

741


Difference between Linked list and Queue?

788


What are the supported platforms by java programming language?

791


Explain serialization and deserialization in java?

765


Is array a class?

697


How many bytes is a char in java?

756


How many bits is a string?

727


What are the escape sequences in java?

745


what is an objects lock and which objects have locks? : Java thread

758


What is array length in java?

711