Forums Register Login

instantiating the class whose name is stored in a string

+Pie Number of slices to send: Send
Hi,
I have a small requirement. I have a string variable holding the name of the class. I want to get the object of that class using that string variable.

For ex. String str = "Test";
I want get the object of class 'Test' using string variable str.

Please guide me how to do it

Thanks
Harathi
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
Thanks alot.. It solved my problem.

Harathi
Anderson gave himself the promotion. So I gave myself this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 491 times.
Similar Threads
object name to string variable
can the following code produces Null pointer exception?‏
Primitive Types!!!
Runtime Function calling -- code
StackOverFlow Exception help
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:44:27.