¿ªÔÆÌåÓýHi Nikola,On Apr 4, 2014, at 5:29 AM, Nikola Novak <reasonsharp@...> wrote:
Have a method boolean containsString(aString) and test that. Have a method putIfAbsent(aString) and test that (by putting the same string twice and observing that I still only have one string. Or something approximately like that. I generally try to avoid something like boolean putString(aString) that returns whether it accepted the string or not, because I try to avoid methods that return a value and do something. I might put up with it but probably not. There are more ways ... Ron Jeffries I have two cats, and a big house full of cat stuff.? The cats fight and divide up the house, messing up their own lives.? Nice work cats.? Meow. |