Page 1 of 1

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

Posted: Wed Jul 13, 2022 7:41 pm
by answerhappygod
a) ArrayList al = new ArrayList();
b) ArrayList al = new ArrayList[];
c) ArrayList al() = new ArrayList();
d) ArrayList al[] = new ArrayList[];