Difference between array and arraylist.
Answer Posted / pooja
ARRAY:
array is a userdefined datatype in almost all languages.
array is able to store only one type of values.
syntax:array a1[10];in c
array a1=new array[10];in c++ &java
that means array can store fixed no of values,ofcourse we
can dynamically allocate memory in java but we can't extend
the size.
ARRAYLIST:
arraylist is not supported in c
it is also a type of array in which we can extend size
dynamically.
syntax:
ArrayList ar=new ArrayList();
where ArrayList is a class
| Is This Answer Correct ? | 25 Yes | 9 No |
Post New Answer View All Answers
What is the difference between math floor and math round?
Why is a string immutable?
What are voids?
What is oop in java?
What are the features in java?
Explain parallel processing in java8?
What does @param args mean in java?
What is the independent variable in an experiment?
What is tochararray in java?
What is the difference between an inner class and a sub-class?
Why java does not support pointers?
Is object a data type?
What is internal variable?
what is the major difference between linkedlist and arraylist in java?
What are the 3 types of control structures?