Arrays on Data Structure and Algorithms related Questions and Answers


Question :   Which of the following is the correct syntax to declare an ArrayList in Java?
1. ArrayList al = new ArrayList();
2. ArrayList al = new ArrayList[];
3. ArrayList al() = new ArrayList();
4. ArrayList al[] = new ArrayList[];
Answer :   1 - ArrayList al = new ArrayList();  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter