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
What is a method type?
Which is bigger double or float?
Can java cast null?
Why to use nested classes in java?
Who found java?
explain multi-threading in java?
what is recursion in java
What are three ways in which a thread can enter the waiting state in java programming?
What is a type parameter in java?
What is a private class in java?
How to use Media tracker Class.
how to create multithreaded program? : Java thread
Can constructor be synchronized?
In how many ways we can do exception handling in java?
What are constants?