Maxco <
cobur...@gmail.com> writes:
> Something roughly equivalent to the Java snippet below:
>
> HashMap hm = (HashMap)Class.forName( "java.util.HashMap"
> ).newInstance();
> hm.put( "Hello", "World" );
> System.out.println( "Hello " + hm.get( "Hello" ) );
That's barely legal java (HashMap is a generic type), and wouldn't
make sense as a translation to go. Do you have a particular problem
you're trying to solve?
In particular, if you know the type, you have an instance. Even in
the above code.
--
dustin