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
How does callback work in java?
What is an infinite loop in java? Explain with an example.
I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?
Is string serializable in java?
Why hashcode is used in java?
What is abstraction in java?
What is the use of generics? When was it added to the Java development Kit?
What is the difference between inheritance and encapsulation?
What is difference between final and finally in java?
What package is math in java?
What is numeric function?
What is locale in java?
What is the difference between object oriented programming language and object based programming language?
Is an empty arraylist null?
Can we override constructors in java?