Hello!
My goal is to create object by it's name using non-default constructor.
Let's consider the following simple "hello world" program to do this:
With
Java 1.6 it works fine, but gives compile time warning:
Note: Hello.java uses unchecked or unsafe operation
Note: Recompile with -Xlint:unchecked for details.
I know the problem is with generics, specifically here: clazz.getDeclaredConstructor(new Class[] {java.lang.String.class}); But how should i change this line to avoid warning?