0
what is the output of this code? array list<Integer>list=new Array list<Integer>(); for(into i=0; i<6; i++){ list.add(i); } int x=0; Iterator<Integer>it=list.iterator(); while(it.hasNext()){ x+=it.next(); } System.out.println(x);
2 odpowiedzi
+ 7
0 + 1 + 2 + 3 + 4 + 5 = 15
- 4
06