Collections and Generics
© examsiri.com
Question : 9 of 53
Marks:
+1,
-0
Given:
What is the result?
1. public static Collection get() {
2.   Collection sorted = new LinkedList();
3.   sorted.add("B"); sorted.add("C"); sorted.add("A");
4.   return sorted;
5. }
6. public static void main(String[] args) {
7.   for (Object obj: get()) {
8.    System.out.print(obj + ", ");
9.   }
10. }What is the result?
Go to Question: