Sail E0 Webinar
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[];
Answer: Option A


This is a non-generic way of creating an ArrayList.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers