Re: Re. about Class class

1999-01-03 Thread Nathan Meyers
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

Re: Re. about Class class

1999-01-03 Thread Dimitrios Vyzovitis
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

RE: Re. about Class class

1999-01-02 Thread Jari . P . Kinnunen
nt: Friday, November 05, 1999 9:22 AM > To: [EMAIL PROTECTED] > Subject: Re. about Class class > > > > 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).

Re. about Class class

1999-01-02 Thread SABYASACHI S GUPTA
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). On Thu, 4 Nov 1999, Nathan Meyers wrote: > Nathan Meyers wrote: > > SABYASACHI S GUPTA wrote: > > > > > > public class saby { > > >

Re. about Class class

1999-01-02 Thread SABYASACHI S GUPTA
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). On Thu, 4 Nov 1999, Nathan Meyers wrote: > Nathan Meyers wrote: > > SABYASACHI S GUPTA wrote: > > > > > > public class saby { > > >

Re: about Class class.

1999-01-02 Thread Bruce R Miller
SABYASACHI S GUPTA wrote: > > I dont know this might be something very simple... > so please excuse me. > > I have the following small code. > > public class saby { > > public static void main(String args[]) > { > > String s = "myclass"; > Class

Re: about Class class.

1999-01-02 Thread Joseph Shraibman
SABYASACHI S GUPTA wrote: > > Now I get the compilation error that method is not there in Object. > So now if I want to call the method of the newly created instance > what should I do... > Cast it. ((myclass) b).method() -

Re: about Class class.

1999-01-02 Thread Nathan Meyers
SABYASACHI S GUPTA wrote: > > I dont know this might be something very simple... > so please excuse me. > > I have the following small code. > > public class saby { > > public static void main(String args[]) > { > > String s = "myclass"; > Class

Re: about Class class.

1999-01-02 Thread Oliver Fels
> I have the following small code. > > public class saby { > > public static void main(String args[]) > { > > String s = "myclass"; > Class c = new Class(); > try { > > c = Class.forName(s); > >

about Class class.

1999-01-02 Thread SABYASACHI S GUPTA
I dont know this might be something very simple... so please excuse me. I have the following small code. public class saby { public static void main(String args[]) { String s = "myclass"; Class c = new Class(); try {