(Choose 1 answer)
What happens when you try to compile and run the following program?
import java.util.*;
public class Main{
public static void main(String argv[]){
TreeSet<Integer> t = new TreeSet<Integer>();
t.add(12);
t.add(2);
t.add(4);
t.add(2);
Iterator<Integer> i = t.iterator();
int sum=0;
while(i.hasNext()) sum += i.next();
System.out.println(sum);
A. The program will print out: 18
B. The program will print out: 20
C. The program will print out: 16
D. The program has a compile error.
Edt (27)