Difference between array and arraylist.
Answer Posted / bhavani
ARRAY:collection of same data items.
2.array is always of fixed size.
3.initializing an array is too long,then it results in wastage
of memory in heap.
ARRAYLIST : Collection of different data objects.
2.Dynamic in nature.
3.automatic resizing of the list.
4.methods used is:add,remove,insert,clear,sort,reverse....
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is static and final keyword in java?
What is the difference between error and an exception?
What does @param args mean in java?
Why is it called a string?
What is the function of static in java?
Can we create constructor in abstract class ?
What is an iterator java?
What is abstraction in java?
how to convert Java project into Maven ?
Explain what access modifiers can be used for methods?
How do you use compareto method?
what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????
What are java packages? What is the significance of packages?
How do you add an element to an arraylist in java?
What are accessor methods in java?