What is the difference between an array and an ArrayList in Java?
A. An array is a fixed-size data structure, while an ArrayList can grow or shrink dynamically.
B. An array can only store primitive data types, while an ArrayList can store any object.
C. An array is an object in Java, while an ArrayList is a primitive data type.
D. None of the above.
Answer:A
What is the difference between an array and an ArrayList in Java?
A. An array is a fixed-size data structure, while an ArrayList can grow or shrink dynamically. B. An array can only store primitive data types, while an ArrayList can store any object. C. An array is an object in Java, while an ArrayList is a primitive data type. D. None of the above.