Which of the following is the correct syntax to declare an ArrayList in Java?
(a) ArrayList al = new ArrayList();
(b) ArrayList al = new ArrayList;
(c) ArrayList al() = new ArrayList();
(d) ArrayList al = new ArrayList;
Question is taken from Dynamic Array in section Arrays Types of Data Structures & Algorithms I
I have been asked this question in an internship interview.