Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
What would be the output of the following program?
ArrayList<Integer> numbers = new ArrayList<Integer>(); numbers.add(6); numbers.add(3); numbers.add(2); numbers.add(3); numbers.remove(3); for (int num : numbers) { System.out.print(num + " "); }
6 2
6 3 2
6 2 3
6 3 2 3
6 3 3