On Oct 22, 8:28 am, Z <ztuff...@gmail.com> wrote:
> I have a name of a class in a string object. Is there a way to call
> that class using its name in a string object? I am using reflection
> and I have the name of the class; is there a way to call it using that
> name?
>
> Thanks
You don't call a class. You can load a class and instantiate it, its
called Reflection.
Don't use reflection! Well, don't use it unless you have a *REALLY*
good reason to.
<
http://virtualinfinity.net/wordpress...007/01/11/the-
dangers-of-reflection-or-put-down-that-mirror/>
Having said that, if you really want to know how, google for Java
Reflection. You can load classes, instantiate objects, call methods,
access fields, etc...
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>