Difference between array and arraylist.

Answer Posted / karunakar

Array is the collection of values of the same data type
>the variables in an array is called array elements
>Array is a reference type data type
>The array structure in System's Memory

Array list is a class .
when you want to access the elements of an array through its
index value location in an array,use an ArrayList.
The use of the arraylist is an alternative to the use of th
array.
The Methods Of ArrayList class are
1)Add
2)Remove
3)Clear
4)Insert
5)TrimToSize
6)Sort
7)Reverse

Is This Answer Correct ?    47 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is map sorted in java?

564


What does jenkins do?

486


How do you find the absolute value?

559


What is the generic function?

528


Give us a program to check for parenthesis matching using stack.

555






What is appletviewer?

566


What is the difference between applet and application?

544


What is difference between next () and nextline () in java?

536


Explain about main() method in java ?

581


What is percentage in java?

569


how we can make a read-only class in java?

539


What is the differences between c++ and java? Explain

584


Why parameters should be passed by reference?

499


how to one war file class to another war file class?

1552


What java is used for?

656