Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java, is this possible?

Name: Anonymous 2009-01-26 19:43

Can I take a string that has a class name and create a new class from it? I can do this in C# but I have no idea how to do so with Java.

Name: Anonymous 2009-01-26 21:47

>>6
If you're running Java >= 5.0 (which you are), it is easier to do this:
SomeClass.class.getConstructor(params).newInstance(args)

Then you don't have to worry about fucking up Class.forName(String).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List