Home > Java Programming > Collections > Questions and Answers
Q: |
What is the output for the below code? import java.util.Iterator; import java.util.Set; import java.util.TreeSet; public class Test { public static void main(String... args) { Set s = new TreeSet(); s.add("7"); s.add(9); Iterator itr = s.iterator(); while (itr.hasNext()) System.out.print(itr.next() + " "); } } | ||||||||||
|
Comment on this Question | |
Name: | |
|