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 c = new Class();
Why assign new Class() ?
> try {
>
> c = Class.forName(s);
>
> Object b = c.newInstance();
Try
myclass b = (myclass) c.newInstance();
> b.method(); // I know this is an error..so what to do?
Or, alternatively
((myclass) b).method();
--
[EMAIL PROTECTED]
http://math.nist.gov/~BMiller/
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]