nobita
unread,Mar 5, 2008, 4:04:44 AM3/5/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Java EE (J2EE) Programming with Passion!
In C#: Activator.CreateInstance(Type.GetType(class_name)) is used to
create an instance which its class is class_name at run-time. Could
you tell me how to do that in Java. I just know
Class.forName(class_name) is used to return the class. Ex:
I want to create an instance of Customer at runtime. In C#, I do like
that:
Customer a =
(Customer)Activator.CreateInstance(Type.GetType("Customer"));
so in Java, how can I do it???? Thanks so much.