What is the result of the following statements?
1: List<String> list = new ArrayList<String>(); 2: list.add("A"); 3: list.add("B"); 4: list.add(7); 5: for(String s : list) System.out.print(s);
D.
The list is instantiated using generics.
Only String objects can be added to list and 7 is an int.