Which of the following classes provides a resizable array, which can grow as needed?

  • Array
  • ArrayList
  • LinkedList
  • Vector
The ArrayList class in Java provides a resizable array that can grow dynamically as elements are added. It is part of the java.util package and is widely used for dynamic collections. LinkedList, while useful for certain scenarios, is not specifically designed as a resizable array like ArrayList. Array represents a fixed-size array, and Vector is similar to ArrayList but is synchronized, making it less efficient in most cases.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *