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
Explain the Propertie sof class?
How to store image in arraylist in java?
What is the structure of java?
What are locale settings?
What is better- service oriented or batch oriented solutions?
What are parsers? Dom vs sax parser.
What is preparedstatement in java?
What is the difference between double and float variables in java?
How a string is stored in memory?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
What are the changes in java.io in java 8 ?
Why java doesn’t support multiple inheritances?
Is 64bit faster than 32 bit?
What are meta-annotations?
How does a for loop work?