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

When should the method invokelater() be used?

568


What is ‘is-a ‘ relationship in java?

580


Why java is considered as platform independent?

580


Is java code slower than native code?

545


Can classes declared using the abstract keyword cab be instantiated?

550






What is the major difference between linkedlist and arraylist?

498


What is sortedset in java?

559


What is method overloading and method overriding?

529


Is upper case in java?

520


What is a java applet? What is an interface?

619


Can we use return in constructor?

480


Can we inherit inner class?

513


What are the high-level thread states in java programming?

573


Can there be an abstract method without an abstract class?

524


What are different types of expressions?

544