Difference between array and arraylist.
Answer Posted / mohammad fazulullah
Array is the object and it stores the object of same type
Eg : Its stores complete integer types or string types
int[] IntArray = new int[3];
string[] StringArray = new StringArray[2];
Arraylist is the collection in which we can store the
objects of any data type.
Eg : Arraylist Arr = new Arraylist()
Arr.Add(13); // Integer Type
Arr.Add(10); // String Type
2 . Arrays has the Fixed Lenght where as the Arraylist
varies the leghth as the objects Added.
Is This Answer Correct ? | 196 Yes | 32 No |
Post New Answer View All Answers
When do you call copy constructor?
What are exception handling keywords in java?
What is lazy initialization in java?
What does percent mean in java?
What is main in java?
What is executor memory?
What 4 doubled?
What are alternatives to java serialization?
What is a parameter in matrices?
Can we override data members in java?
What is the difference between object oriented programming language and object based programming language?
How to reverse a string in java?
Describe the various concepts related to object oriented programming (oop).
When do I need to use reflection feature in java?
How do you declare an array in java?