crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

Difference between Array and ArrayList in Java?
Question Posted on 14 Feb 2021Home >> Java >> Java Questions >> Difference between Array and ArrayList in Java?

Difference between Array and ArrayList?
Below are the main difference between Array and ArrayList:-
(1)Array:-Arrays of parameterized types are not allowed.
(1)ArrayList:-Arraylists are type

(2)ArrayArray cannot contain values of different data types.
(2)ArrayList:-ArrayList contains values of different data types.

(3)ArrayIn array we need to define the size of array.
(3)ArrayList:-In arraylist size can be changed dynamically.

(4)ArrayArray can contain primitive data types as well as objects.
(4)ArrayList:-Arryalist can contain only objects and no primitive data types are allowed.

(5)ArrayIn Arraylist we only need to specify the index to add data/
(5)ArrayList:-we donot worry about to specify the index.

(6)ArrayArray are static
(6)ArrayList:-Arraylist are dynamic

(7)ArrayTo put any element in array we need to know the position.
(7)ArrayList:-Here we can add element by using add method.

(8)ArrayIt is part of core java programming.
(8)ArrayList:-ArrayList is a part of collection framework with other classes such as vector, hashmap etc.
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

What are the main difference between Array and Arraylist

What is classloader in Java and name of some classloader

Different modules of the Spring framework

Difference between Object and Class

Most important 15 aspects that Java Developer should learn in year 2020






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap