SABYASACHI S GUPTA wrote:
>
> Yup I figured that out ...
> but how do I do a typecast when I have the class name in a String
> variable during runtime. (I do NOT know the class name to typecast).
Ah, I guess I really did understand your original question and gave
decent advice :-). If you're try
SABYASACHI S GUPTA wrote:
> Yup I figured that out ...
> but how do I do a typecast when I have the class name in a String
> variable during runtime. (I do NOT know the class name to typecast).
You don't really have to typecast. Just call your intended method via reflection:
ie: use Class.forNa
Hi!
You can't do that.
You are going to cast an object to something that you
don't know what it is going to be.
Then what are you going to do with the object after that?
Do you know any method to call or what?
The whole code after that should be also "dynamic".
This sounds like you wan't to do a