I have a problem with the hashset implementation because the followinf little part of my code uses it and doesn't give the same result according to the version of android.
Here is my code :
Using java Syntax Highlighting
- HashSet<String> hset=new HashSet<String>();
- hset.add(new String("cat"));
- hset.add(new String("dog"));
- hset.add(new String("youpi"));
- hset.add(new String("argh"));
- hset.add(new String("cat"));
- hset.add(new String("why"));
- hset.add(new String("dummmy"));
- for(String s:hset)
- Log.v("test",s);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
with android 1.5 I obtain :
argh
cat
why
youpi
dog
dummmy
whereas with android 2.0 I obtain
argh
youpi
cat
dummmy
dog
why
Does anyone have any idea of the problem?
Thanks in advance
Raphaël

