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

What are variable arguments or varargs?

765


What is the technique adopted to create an immutable class?

741


How do you add an arraylist to an array in java?

697


Are maps ordered java?

673


What is the function of character?

737






What are the main concepts of oops in java?

1048


What is 32 bit float?

730


What is size of int in java?

766


What is the scope or life time of instance variables?

850


What are the rules for naming an array?

692


What are the advantages of passing this into a method instead of the current class object itself?

1381


What is a "pure virtual" member function?

823


Why is singleton instance static?

705


What is synchronization and why is it important in java programming?

677


What does I ++ mean?

797