by
What is the difference between Array and ArrayList in JAVA?

1 Answer

0 votes
by

The main differences between the Array and ArrayList are given below.

SN Array ArrayList
1 The Array is of fixed size, means we cannot resize the array as per need. ArrayList is not of the fixed size we can change the size dynamically.
2 Arrays are of the static type. ArrayList is of dynamic size.
3 Arrays can store primitive data types as well as objects. ArrayList cannot store the primitive data types it can only store the objects.

Related questions

0 votes
    What is the difference between Iterator and Enumeration in JAVA?...
asked May 26, 2021 in Education by JackTerrance
0 votes
    Which of the following option leads to the portability and security of Java? a) Bytecode is executed by ... stackoverflow.com 🔗Source: Java Interview Questions and Answers...
asked Dec 19, 2020 in Education by Editorial Staff
0 votes
    What is the difference between the length of an Array and size of ArrayList in Java?...
asked May 27, 2021 in Technology by JackTerrance
0 votes
    How to convert ArrayList to Array and Array to ArrayList in JAVA?...
asked May 27, 2021 in Technology by JackTerrance
0 votes
    What is the difference between length() and size() of ArrayList? (a) length() and size() return the ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    What is the difference between length() and size() of ArrayList? (a) length() and size() return ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is the difference between ArrayList and LinkedList?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between ArrayList and Vector?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    Which of these methods can be used to obtain a static array from an ArrayList object? (a) Array() ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    I am writing a program to optimize a transportation system. I have an ArrayList "passengers" of 65,000 ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    I am writing a program to optimize a transportation system. I have an ArrayList "passengers" of 65,000 ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 10, 2022 in Education by JackTerrance
0 votes
    What is the difference between pointer to an array and array of pointers?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    What is difference between dequeue() and peek() function of java? (a) dequeue() and peek() remove and ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    I am importing a project from C to Java which involves a lot of floating-point arithmetic. Are there ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I am importing a project from C to Java which involves a lot of floating-point arithmetic. Are there ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
...