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 syntax and characteristics of a lambda expression? Explain

537


What are the differences between the constructors and methods?

571


What is binary tree in java?

528


Can we have 2 main methods in java class?

537


Can we declare array without size in java?

545






How do you replace all in word?

520


Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

1507


Which number is denoted by leading 0x or 0x in java?

556


What is the difference between super class & sub class?

562


Why do we use predicate in java?

553


I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in

1593


Can you give names of Container classes?

1849


How does system arraycopy work in java?

577


Can we create an object of static class in java?

591


Can bool be null?

516