equal
deleted
inserted
replaced
27 * @summary min and max methods fail if size changes in between a call to size |
27 * @summary min and max methods fail if size changes in between a call to size |
28 * and an attempt to iterate. |
28 * and an attempt to iterate. |
29 * @author Josh Bloch |
29 * @author Josh Bloch |
30 */ |
30 */ |
31 |
31 |
32 import java.util.*; |
32 import java.util.Collections; |
|
33 import java.util.LinkedHashSet; |
|
34 import java.util.Set; |
33 |
35 |
34 public class MinMax { |
36 public class MinMax { |
35 public static void main(String[] args) { |
37 public static void main(String[] args) { |
36 Set s = new LyingSet(); |
38 Set s = new LyingSet(); |
37 s.add("x"); |
39 s.add("x"); |