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 is the difference between this() and super() in java?

640


What is the difference between the file and randomaccessfile classes?

653


Is null an object java?

642


What do you meant by active and passive objects?

705


Can we have 2 main methods in java class?

628






What is unicode datatype?

613


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

895


Explain parallel processing in java8?

748


What is set and get methods in java?

632


What is the use of bufferedreader?

639


how many types of Inheritance?

776


What about instanceof operator in java?

680


What is local variable and instance variable?

694


Difference between Linked list and Queue?

695


How do you include a string in java?

610