0

i wanna know how /?

What is the output of this code? ArrayList<Integer> list = new ArrayList<Integer>(); for (int 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);

1st Aug 2017, 10:48 PM
Hazem Tarek
Hazem Tarek - avatar
1 Answer
- 1
Please help your self Run it and see
3rd Aug 2017, 3:34 PM
Adhiraj Dhar
Adhiraj Dhar - avatar