Arraylist | Sololearn: Learn to code for FREE!

0

Arraylist

Say whether following statements are correct or not??? 1.List<Integer>fan=new ArrayList<>(); 2.List<Integer>fan=new LinkedList<>(); 3.Queue<Integer>fan=new Linkedlist<>();

5/14/2020 3:58:33 PM

Haritha Vuppula

3 Answers

New Answer

+2

The first two are correct but the last one isn't - there's a syntax error, "Linkedlist" doesn't exist. As long as you import Java's utility module, the first two should work.

0

Are you confused on what is being asked?

0

yeah Jianmin Chen