... It works for me.
Here's the full code I'm using:
public class Test
{
public static void main(String[] args)
{
String classname = "t1";
Type: Posts; User: helloworld922
... It works for me.
Here's the full code I'm using:
public class Test
{
public static void main(String[] args)
{
String classname = "t1";
The class Class has a generic type. You can use a wild-card because you don't know what type it's suppose to be.
Class<?> classDefinition = Class.forName(className);
preent isn't a method of type Object, you must type cast because the object has been polymorphed.
maiin M = new maiin();
Object O = M.createObject("t1");
if (O instanceof t1)
{
//...