Question: Which of the following is the correct syntax to declare an ArrayList in Java?

Options

A : ArrayList al = new ArrayList();

B : ArrayList al = new ArrayList[];

C : ArrayList al() = new ArrayList();

D : ArrayList al[] = new ArrayList[];

Click to view Correct Answer

Previous || Next

Data Structure Dynamic Array more questions

Parasitic element that is typically about 5 percent longer than....

What is Character-Array?

Which of the following gives the memory address of the....

Which of the following accesses the seventh element stored in....

What is the correct syntax of declaring an array class?

Which of the following points is/are not true about Linked....

Which of the following is not allowed?

What are parallel arrays?

What is a sorted array?

What are the vectors?

Data Structure Adjacency List more Online Exam Quiz

Data Structure Direct Addressing Tables

Data Structure Directed Acyclic Graph

Data Structure Directed Graph

Data Structure Double Ended Queue

Data Structure Doubly Linked Lists

Data Structure Dynamic Programming

Data Structure Edit Distance Problem

Data Structure Entrance Exams

Data Structure Evaluation Infix Expression Not Parenthesized

Data Structure Experienced