Difference between array and arraylist.

Answer Posted / vk

Array is a collection of similar data types,ArrayList is not you can store any type of data types in AL.ArrayList will autometically increase 50% of the size which we allocated previously, but Array wasn't.

ArrayList al= new ArrayList();
al.add("a");
al.add(10);

both can be accepted in ArrayList.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an immutable object?

667


What about features of local inner class?

705


What is internal iteration in java se 8?

715


Enlist few advantages of inheritance?

693


How to retrieve data from database in java using arraylist?

626






What is hashtable and explain features of hashtable?

650


What is the use of callablestatement?

666


Mention a package that is used for linked list class in java.

624


What is difference between static and final?

661


What is anagram of a string?

598


How does a for loop work?

623


List any five features of java?

676


Explain about method local inner classes or local inner classes in java?

667


What does a void function return?

646


What are the differences between c++ and java?

673