Given below the sample code :
public static Collection fetch() {
Collection mylist = new LinkedList();
sorted.add("B"); sorted.add("C"); sorted.add("A");
return mylist;
}
public static void main(String[] args) {
for (Object o: fetch()) {
System.out.print(o + ", ");
}
}
What will be the output of the following code ?
1. Give compile error
2. A B C
3 B, C , A
4. B C A
(3)