(Collection<String> collection)
| 7 | |
| 8 | public class PrintingCollections { |
| 9 | static Collection |
| 10 | fill(Collection<String> collection) { |
| 11 | collection.add("rat"); |
| 12 | collection.add("cat"); |
| 13 | collection.add("dog"); |
| 14 | collection.add("dog"); |
| 15 | return collection; |
| 16 | } |
| 17 | static Map fill(Map<String, String> map) { |
| 18 | map.put("rat", "Fuzzy"); |
| 19 | map.put("cat", "Rags"); |