0

Advanced JAVA Generics code question

Why my code got no output , shouldn't it should be output as "i am a camera". https://code.sololearn.com/cy06NMr7BJRO

3rd Sep 2019, 2:55 PM
Tzion
Tzion - avatar
3 Answers
+ 4
ArrayList<camera> list1 = new ArrayList<camera>(); list.add(new camera()); list.add(new camera()); You want to fill list1 with values but you filled list.
3rd Sep 2019, 3:38 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Denise Roßberg Thanks so much
3rd Sep 2019, 10:40 PM
Tzion
Tzion - avatar
0
Cause you not attentive, and list that you want to print don't contain any values.
3rd Sep 2019, 3:21 PM
id001x
id001x - avatar