Which of the following is the correct syntax to construct an ArrayList to store integers? a. ArrayList

Question:

Which of the following is the correct syntax to construct an ArrayList to store integers?

a. ArrayList list = new ArrayList();

b. ArrayList[int] list = new ArrayList[int]();

c. ArrayList list<> = new ArrayList();

d. ArrayList list = new ArrayList();

e. ArrayList list = new ArrayList<>();

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Building Java Programs A Back To Basics Approach

ISBN: 9780135471944

5th Edition

Authors: Stuart Reges, Marty Stepp

Question Posted: