Advanced JAVA Generics code question | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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