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);
1 Answer
- 1
Please help your self
Run it and see