H
hilz
Hi all.
I was running a simple test on a TreeMap and i ran into something weird. I
am sure there is something i misunderstand, but i don't know what it is.
here is what i did:
java.util.TreeMap t = new java.util.TreeMap();
java.util.Set keys = t.keySet();
System.out.println( "class=" + keys.getClass().toString() );
the last statement prints the following:
class=class java.util.TreeMap$1
This sounds weird, as i expect to get a Set and not a Map.
any comments?
thanks
hilz
I was running a simple test on a TreeMap and i ran into something weird. I
am sure there is something i misunderstand, but i don't know what it is.
here is what i did:
java.util.TreeMap t = new java.util.TreeMap();
java.util.Set keys = t.keySet();
System.out.println( "class=" + keys.getClass().toString() );
the last statement prints the following:
class=class java.util.TreeMap$1
This sounds weird, as i expect to get a Set and not a Map.
any comments?
thanks
hilz