Java?????????
???????????? ???????[ 2014/12/1 11:13:14 ] ????????JAVA ???????
????JAVA???????????????????????????????????????????????????????????????????
????NewObject o = new NewObject();
????NewObject o = new NewObject("test");
????NewObject o = new NewObject(new String[]{"aaa"??"bbb"});
?????????????????????java.lang.Class<T>???????JAVA??????????
????1?????????
??????????п?????????????????
public class NewObject
{
String name;
public NewObject(String[] name)
{
this.name = name[0];
System.out.println(“ the object is created!”);
}
public void write()
{
System.out.println(this.name);
}
}
??????????′??????????????
NewObject no = null;
try
{
no = (NewObject)Class.forName(className).newInstance();
no.write();
}
catch (InstantiationException e)
{
e.printStackTrace();
}
catch (IllegalAccessException e)
{
e.printStackTrace();
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11