Vidyalelo
Data Structure · Q62

Arrays in Data Structures

Programming · Data Structure · question 62

Q62

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

A.
ArrayList al = new ArrayList();
Answer
B.
ArrayList al = new ArrayList[];
C.
ArrayList al() = new ArrayList();
D.
ArrayList al[] = new ArrayList[];

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board