Ask Question
6 October, 21:27

To use an ArrayList in your program, you must import:1. the java. collections package

2. the java. awt package

3. Nothing; the class is automatically available, just like regular arrays.

4. the java. util package

5. the java. lang package

+1
Answers (1)
  1. 7 October, 01:21
    0
    Option 4: the java. util package

    Explanation:

    ArrayList is one of the Java collections that offer some handy features to manipulate a list of elements. ArrayList is not available in a Java program by default without explicitly import it. To use ArrayList, we need to write an import statement as follows:

    import java. util. ArrayList;

    After that, we can only proceed to declare an ArrayList in our Java program. For example:

    ArrayList studentNames = new ArrayList ();
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “To use an ArrayList in your program, you must import:1. the java. collections package 2. the java. awt package 3. Nothing; the class is ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers